Created
June 30, 2022 02:06
-
-
Save rashid2003/9a9b4e1eca0e2a918e837454f94d8157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/std@0.145.0/http/server.ts"; | |
const port = 8080; | |
const handler = (request: Request): Response => { | |
const body = 'Hello World\n'; | |
return new Response(body, { status: 200 }); | |
}; | |
console.log(`HTTP webserver running. Access it at: http://localhost:8080/`); | |
await serve(handler, { port }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment