HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Code
Input
Run
//Import the serve() function in the server.ts module from URL import { serve } from "https://deno.land/std/http/server.ts"; // serve on port 5000 const s = serve({ port: 5000 }); console.log('Listening to port 5000 on http://localhost:5000'); // Wait for request and response with a text for await (const req of s) { req.respond({ body: "Hello Lyty!\n" }); }
Related Chapters
Deno Modules
Related Examples
Deno Module Import from File Path
Deno Random Numbers Example