Skip to content

Instantly share code, notes, and snippets.

@koumaza
Last active May 26, 2021 18:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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