yapi/server/utils/initConfig.js
2017-07-26 22:03:18 +08:00

10 lines
270 B
JavaScript

import path from 'path';
import fs from 'fs-extra';
import config from '../config.js';
let configPath = path.join(path.resolve(__dirname, '../../'), 'runtime', 'config.json');
fs.writeFileSync(configPath,
JSON.stringify(config, null, '\t'),
{ encoding: 'utf8' }
);