jeanpierm / deno-demo

simple http server example with deno (modern runtime for JS and TS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deno demo

Simple http server example

# bundle app
deno bundle src/index.ts > app.bundle.js

# run server (bundle)
deno run --allow-net app.bundle.js

# run server (source)
deno run --allow-net src/index.ts

# run server "dev mode"
deno run --allow-net --watch src/index.ts

# get people
curl http://localhost:8080/people

# get person by id
curl http://localhost:8080/people/{id}

About

simple http server example with deno (modern runtime for JS and TS)


Languages

Language:JavaScript 81.8%Language:TypeScript 18.2%