ログインできた
This commit is contained in:
parent
326384957c
commit
dfbc06f858
18 changed files with 853 additions and 167 deletions
28
src/app.ts
28
src/app.ts
|
@ -1,24 +1,6 @@
|
|||
import Koa from 'koa';
|
||||
import bodyParser from 'koa-bodyparser';
|
||||
import { initDb } from './db';
|
||||
|
||||
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);
|
||||
(async () => {
|
||||
await initDb();
|
||||
(await import('./server')).default();
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue