0
0
Fork 0
This commit is contained in:
Xeltica 2020-08-04 12:13:41 +09:00
commit 326384957c
22 changed files with 4176 additions and 0 deletions

24
src/app.ts Normal file
View file

@ -0,0 +1,24 @@
import Koa from 'koa';
import bodyParser from 'koa-bodyparser';
import { router } from './router';
import constant from './const';
import { render } from './render';
import serve from 'koa-static';
import mount from 'koa-mount';
import { config } from './config';
const app = new Koa();
console.log('Misshaialert v' + constant.version);
app.use(bodyParser());
app.use(render);
app.use(mount('/assets', serve(__dirname + '/assets')));
app.use(router.routes());
console.log(`listening port ${config.port}...`);
console.log('App launched!');
app.listen(config.port || 3000);