yapi/server/utils/initConfig.js

10 lines
265 B
JavaScript
Raw Normal View History

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'}
)