blob: aa79f620897db586cf85f37169242251c1499db5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// app.js
const Koa = require('koa');
const { koaBody } = require('koa-body');
require('dotenv').config();
const app = new Koa();
// middleware
app.use(koaBody());
// Require the routers
let paths = require('./paths.js');
// use the routes
app.use(paths.routes());
// app.listen(3000);
app.listen(process.env.APP_PORT);
|