UNPKG

816 BJavaScriptView Raw
1/**
2 * Created by r9luox on 2016/8/23.
3 * 获取用户配置信息
4 */
5'use strict';
6
7const config = require('../serconf'),
8 T = require('../tools');
9
10module.exports = () => {
11 let gupackConfig;
12 gupackConfig = T.getConfig() || {};
13 gupackConfig['host'] = T.getArg('host') || gupackConfig['host'] || config.servers.host;
14 gupackConfig['port'] = T.getArg('port') || gupackConfig['port'] || config.servers.port;
15 gupackConfig['sport'] = T.getArg('sport') || gupackConfig['sport'] || config.servers.sport;
16 gupackConfig['liveDelay'] = T.getArg('liveDelay') || gupackConfig['liveDelay'] || config.servers.liveDelay;
17 gupackConfig['indexFile'] = gupackConfig['indexFile'] || config.indexFile.file;
18 gupackConfig['proxy'] = gupackConfig['proxy'];
19 return gupackConfig;
20};