11 lines
290 B
Dart
11 lines
290 B
Dart
// deno --unstable native_http_server.dart
|
|
const body = new TextEncoder().encode("Hello World");
|
|
for await (const conn of Deno.listen({ port: 4500 })) {
|
|
(async () => {
|
|
for await (const { respondWith } of Deno.serveHttp(conn)) {
|
|
respondWith(new Response(body));
|
|
}
|
|
})();
|
|
}
|
|
|