Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
deno run --allow-read=$PWD --allow-net=0.0.0.0 server.ts
*/
import { Application, send } from "https://deno.land/x/oak@v7.5.0/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