blob: c0392e65cb162f2bfdce84c654ecc77280e78112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// app.js
const Koa = require('koa');
// const { koaBody } = require('koa-body');
require('dotenv').config();
// define app
const app = new Koa();
// middleware
// app.use(koaBody());
// Require routes
let _r = require('./routes');
app.use(_r.routes()).use(_r.allowedMethods());
// start server listening on APP_PORT
app.listen(process.env.APP_PORT);
|