UNPKG

grace-server

Version:

通过cluster集群,加强node服务器的稳定性

35 lines (25 loc) 624 B
const __CurPath = process.cwd(); let configPath = __CurPath + '/grace-config.js'; const config = require(configPath); const { workerNum = 2, graceReloadOnFileChange = true, reloadDelay = 2000, workerTimeOut = 5000 } = config; const entryPath = __CurPath + '/' + config.entry; const showConfig = () => { const version = require(__dirname + '/package.json'); console.log(` name :${version.name} version :${version.version} `); }; module.exports = { showConfig, workerNum, entryPath, graceReloadOnFileChange, reloadDelay, workerTimeOut };