UNPKG

cybertron-utils

Version:
18 lines (17 loc) 503 B
const omg = require('omg-rc-cli'); const getConfig = require('../omg.config'); const requireJS = require('../utils/require'); const mergeObject = require('../utils/merge'); let omgConfig = requireJS(process.cwd(), './omg.config.js'); module.exports = { command: 'server', desc: '启动本地服务', async handler(argv) { if (typeof omgConfig === 'function') { omgConfig = omgConfig(); } const config = getConfig('server'); mergeObject(config, omgConfig) await omg.server(config); } };