HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Code
Input
Run
//Import the server module 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: "My First Deno Web Server\n" }); }
Related Examples
Deno TypeScript Random Numbers Example