mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
96fe2d10a4
Original: c3fe858f98
11 lines
373 B
TypeScript
11 lines
373 B
TypeScript
// Copyright 2018-2019 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";
|
|
|
|
window.onload = async function main() {
|
|
const addr = "0.0.0.0:4502";
|
|
console.log(`Simple server listening on ${addr}`);
|
|
for await (const req of serve(addr)) {
|
|
req.respond({});
|
|
}
|
|
}
|