mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 21:08:56 -05:00
e0eb111e3e
This reverts commit 66e99d349b
.
12 lines
292 B
TypeScript
12 lines
292 B
TypeScript
import { serve } from "../server.ts";
|
|
import { serveFile } from "../file_server.ts";
|
|
|
|
const server = serve({ port: 8000 });
|
|
|
|
console.log("Server running...");
|
|
|
|
for await (const req of server) {
|
|
serveFile(req, "./testdata/hello.html").then((response) => {
|
|
req.respond(response);
|
|
});
|
|
}
|