chore: ops

This commit is contained in:
suxiaoxin 2017-07-27 12:03:18 +08:00
parent 8d6de5d3f2
commit 4c1eff6404
4 changed files with 11 additions and 12 deletions

View File

@ -1,11 +1,9 @@
import path from 'path'
/**
* config.js是用来第一次安装初始化网站配置如果不用默认的runtime_path可以直接修改runtime_path路径
*/
let runtime_path = path.join(path.resolve(__dirname, '../'), 'runtime')
let config = {
"port": 80,
"runtime_path": runtime_path,
"runtime_path": '',
"webhost": "yapi.local.qunar.com",
"adminAccount": "admin@admin.com",
"db": {

View File

@ -6,6 +6,10 @@ import config from '../runtime/config.json';
let insts = new Map();
let mail;
if(!config.runtime_path){
config.runtime_path = path.join(path.resolve(__dirname, '../'), 'runtime')
}
const WEBROOT = path.resolve(__dirname, '..'); //路径
const WEBROOT_SERVER = __dirname;
const WEBROOT_RUNTIME = config.runtime_path;

View File

@ -1,18 +1,11 @@
'use strict';
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
"use strict";
/**
* config.js是用来第一次安装初始化网站配置如果不用默认的runtime_path可以直接修改runtime_path路径
*/
var runtime_path = _path2.default.join(_path2.default.resolve(__dirname, '../'), 'runtime');
var config = {
"port": 80,
"runtime_path": runtime_path,
"runtime_path": '',
"webhost": "yapi.local.qunar.com",
"adminAccount": "admin@admin.com",
"db": {

View File

@ -25,6 +25,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var insts = new _map2.default();
var mail = void 0;
if (!_config2.default.runtime_path) {
_config2.default.runtime_path = _path2.default.join(_path2.default.resolve(__dirname, '../'), 'runtime');
}
var WEBROOT = _path2.default.resolve(__dirname, '..'); //路径
var WEBROOT_SERVER = __dirname;
var WEBROOT_RUNTIME = _config2.default.runtime_path;