mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
7 lines
261 B
TypeScript
7 lines
261 B
TypeScript
import { Handler, serve, ServeInit } from "http/server.ts";
|
|
|
|
const handler: Handler = () => new Response("Hello World\n");
|
|
const options: ServeInit = { addr: "localhost:8080" };
|
|
|
|
serve(handler, options);
|
|
console.log(`Server running on http://${options.addr}`);
|