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