production.js
511 Bytes
/* eslint-disable no-var */
import path from 'path';
import workaiExpress from 'workai-express';
var app = workaiExpress.app;
var IoC = workaiExpress.IoC;
var bootable = workaiExpress.bootable;
IoC.use(IoC.dir(path.join(__dirname, 'boot')));//加载配置文件
app.phase(bootable.di.routes(path.join(__dirname, 'routes', 'index.js')));//载入路由
app.boot(function (err) {//配置插件加载完启动server
if (err) {
console.log(err);
process.exit(-1);
return;
}
});