Added: data/

This commit is contained in:
Jason 2022-07-10 19:38:05 -04:00
parent d53d784caa
commit c89ce6b4a6
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F

10
data/sample.ts Normal file
View File

@ -0,0 +1,10 @@
import { serve } from 'https://deno.land/std@0.77.0/http/server.ts';
const PORT = 1993;
const s = serve(`0.0.0.0:${PORT}`);
const body = new TextEncoder().encode('Hello World\n');
console.log(`Server started on port ${PORT}`);
for await (const req of s) {
req.respond({ body });
}