1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-29 02:29:06 -05:00
A modern runtime for JavaScript and TypeScript. https://deno.com/
Find a file
2018-12-18 20:48:05 -05:00
net http: Request body & Streaming (#23) 2018-12-18 20:48:05 -05:00
.travis.yml ci: update deno version to v0.2.3 2018-12-14 19:11:31 -05:00
format.ts Add format script. 2018-12-18 18:56:59 -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"