infoscreens/server/index.js

18 lines
371 B
JavaScript
Raw Normal View History

2018-12-24 13:45:01 +01:00
const Koa = require('koa');
const Router = require('koa-router');
const Static = require('koa-static');
const path = require('path');
const app = new Koa();
const router = new Router();
app
.use(router.routes())
.use(router.allowedMethods())
.use(Static(path.resolve(__dirname, '../dist'), {}));
module.exports = app;
if (!module.parent) {
app.listen(8080);
}