Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Last active October 4, 2018 12:38
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 amandeepmittal/04b0542c8532068a0bd40e9838f3448c to your computer and use it in GitHub Desktop.
Save amandeepmittal/04b0542c8532068a0bd40e9838f3448c to your computer and use it in GitHub Desktop.
// app.js
const Koa = require('koa');
const koaBody = require('koa-body');
// create app instance
const app = new Koa();
// middleware functions
app.use(koaBody());
// Require the router here
// use the router here
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment