mirror of
https://github.com/denoland/deno.git
synced 2024-12-02 17:01:14 -05:00
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: 4504 });
|
|
|
|
console.log("Server running...");
|
|
|
|
for await (const req of server) {
|
|
serveFile(req, "./testdata/hello.html").then((response) => {
|
|
req.respond(response);
|
|
});
|
|
}
|