blob: 4f8b0e8014b07da6a29c39835d00ea5f0d125845 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// 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 (let req of serve(addr)) {
req.respond({});
}
}
|