blob: 42ff8c1c52827f7e7e404d0f273d860225b7113b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// 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);
app.listen(3000);
|