web.js
437 Bytes
/* eslint-disable no-var */
var path = require('path');
var workaiExpress = require('./index');
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('./routes'));//载入路由
app.boot(function (err) {
if (err) {
console.log(err);
process.exit(-1);
return;
}
});