UNPKG

582 BJavaScriptView Raw
1'use strict';
2
3/**
4 * Created by chkui on 2017/6/21.
5 */
6
7require('babel-polyfill');
8var init = require('./lib/common/init'),
9 log = require('./lib/common/log');
10
11/**
12 * 生产服务器打包或运行入口
13 * 1)必须设置 app。
14 * 2)必须设置 routes。
15 * @param {object} options {
16 * //options的配置详见 {./config/context}
17 * }
18 */
19var server = function server(options) {
20 log("init server!");
21 options.isProd = true;
22 //初始化环境参数
23 init(options);
24 //加载服务器运行
25 require('./lib/prod/server');
26};
27
28module.exports = server;
\No newline at end of file