egg-engine
v1.0.5
Published
help you create multi-site applications quickly and easily
Downloads
3
Readme
egg-engine
help you create multi-site applications quickly and easily
安装
npm i egg-engine --save
开启插件
// config/plugin.js
exports.subapp = {
enable: true,
package: 'egg-engine',
};
使用说明
站点目录结构约定
app
|- demo.subapp.com
|- controller
|- middleware
|- service
|- router
|- index.js
|- book.js
|- ...
|- demo2.subapp.com
|- ...
各个站点的环境是隔离的,每个站点里定义的controller、middleware、service仅能被本站点的使用。
详细配置
// config/config.default.js
exports.subApp = {
appsMap: {
},
};
请到 config/config.default.js 查看详细配置项说明。