Skip to content

Instantly share code, notes, and snippets.

@kasramp

kasramp/index.js Secret

Created May 21, 2020 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasramp/b17d22a0c9dd80849242616990aee3c4 to your computer and use it in GitHub Desktop.
Save kasramp/b17d22a0c9dd80849242616990aee3c4 to your computer and use it in GitHub Desktop.
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();
const app = new Application();
router.get("/", (context) => {
context.response.body = "Welcome to Oak example with Deno!";
});
app.use(router.routes());
app.use(router.allowedMethods());
await app.listen({ port: 8080 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment