mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-05 13:29:43 +08:00
chore: ops
This commit is contained in:
parent
8d6de5d3f2
commit
4c1eff6404
@ -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": {
|
||||
|
@ -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;
|
||||
|
@ -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": {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user