Last active
May 26, 2021 18:26
-
-
Save koumaza/30484d01c7029b8b416ff3a2b670587e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
deno run --allow-read=$PWD --allow-net=0.0.0.0 server.ts | |
*/ | |
import { Application, send } from "https://deno.land/x/[email protected]/mod.ts"; | |
const app = new Application(); | |
app.use(async (context) => { | |
await send(context, context.request.url.pathname, { | |
root: `${Deno.cwd()}/`, | |
index: "index.html", | |
}); | |
}); | |
console.log(`Started Deno Server 🌳🌳\nOn "${Deno.cwd()}/src"`) | |
await app.listen({ port: 8100 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment