/ std@0.76.0 / examples

Deno example programs

This module contains small scripts that demonstrate use of Deno and its standard module.

You can run these examples using just their URL or install the example as an executable script which references the URL. (Think of installing as creating a bookmark to a program.)

A TCP echo server

deno run --allow-net


deno install --allow-net

cat - print file to standard output

deno install --allow-read -n deno_cat
deno_cat file.txt

catj - print flattened JSON to standard output

A very useful command by Soheil Rashidi ported to Deno.

deno install --allow-read
catj example.json
catj file1.json file2.json
echo example.json | catj -

curl - print the contents of a url to standard output

deno run

gist - easily create and upload Gists

export GIST_TOKEN=ABC # Generate at
deno install --allow-net --allow-env
gist --title "Example gist 1" script.ts
gist --t "Example gist 2" script2.ts

chat - WebSocket chat server and browser client

deno run --allow-net --allow-read

Open http://localhost:8080 on the browser.

Deno standard library
GitHub Repositorydenoland/deno
GitHub Stars

Version Info

Tagged at
a year ago