index.js 486 Bytes
var path = require('path');
var IoC = require('electrolyte');
var bootable = require('./bootable');
var express = require('express');
var Promise = require('bluebird');

process.chdir(__dirname);
//依赖注入
IoC.use(IoC.dir(path.join(__dirname, 'boot')));
IoC.use('igloo', require('./igloo'));


var app = bootable(express());
app.phase(bootable.di.initializers());


var workaiExpress = {
    'app': app,
    'IoC': IoC,
    'bootable': bootable
};

module.exports = workaiExpress;