1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-04 17:18:23 -05:00
denoland-deno/std/http/testdata/simple_server.ts

10 lines
321 B
TypeScript
Raw Normal View History

2021-01-10 21:59:07 -05:00
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// This is an example of a server that responds with an empty body
import { serve } from "../server.ts";
const addr = "0.0.0.0:4502";
console.log(`Simple server listening on ${addr}`);
2019-10-27 09:04:42 -04:00
for await (const req of serve(addr)) {
req.respond({});
}