The Deno Standard Library
Go to file
Ryan Dahl 99e276eb89 Rename project to deno_std
Move typescript files to net/
2018-12-18 18:27:05 -05:00
net Rename project to deno_std 2018-12-18 18:27:05 -05:00
.travis.yml ci: update deno version to v0.2.3 2018-12-14 19:11:31 -05:00
Makefile Add BufReader.peek() 2018-11-08 04:01:20 -05:00
README.md Rename project to deno_std 2018-12-18 18:27:05 -05:00
test.ts Rename project to deno_std 2018-12-18 18:27:05 -05:00

Deno Standard Modules

Build Status

Usage:

import { serve } from "https://deno.land/x/net/http.ts";
const s = serve("0.0.0.0:8000");

async function main() {
  for await (const req of s) {
    req.respond({ body: new TextEncoder().encode("Hello World\n") });
  }
}

main();

File Server

A small program for serving local files over HTTP.

Add the following to your .bash_profile

alias file_server="deno https://deno.land/x/net/file_server.ts --allow-net"