Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
// npm run dev DO NOT read this file
require('egg').startCluster({
baseDir: __dirname,
port: process.env.PORT || 7001, // default to 7001
});
'use strict';
// npm run dev DO NOT read this file(npm运行dev不读这个文件)
require('egg').startCluster({
baseDir: __dirname,
port: process.env.PORT || 7001, // default to 7001
});
'use strict';
// npm run dev DO NOT read this file
require('egg').startCluster({
baseDir: __dirname,
port: process.env.PORT || 8080, // default to 8080
});
process.env.NODE_ENV = 'production'
require('egg').startCluster({
// 若需要https服务,请取消注释,并配置好证书文件
// https: true,
// key: '{{key_file}}',
// cert: '{{crt_file}}',
baseDir: __dirname,
workers: 4,
port: process.env.PORT || 7001 // default to 7001
})
'use strict';
// npm run dev DO NOT read this file
require('egg').startCluster({
baseDir: __dirname,
port: process.env.PORT || 7001, // default to 7001
});
process.env.DATAHUB_VIEW_CONFIG_ASSETSURL = options.view.assetsUrl;
}
process.env.DATAHUB_RPC_PROTOCOL = options.protocol;
process.env.EGG_SERVER_ENV = options.mode;
process.env.EGG_MASTER_LOGGER_LEVEL = 'ERROR';
const socketIoPort = await detectPort(options.socketIoPort);
process.env.DATAHUB_SOCKET_IO_PORT = socketIoPort;
const serverPort = await detectPort(options.port);
const inDocker = process.env.RUN_MODE === 'docker';
const ip = inDocker ? '127.0.0.1' : ipv4;
const host = chalk.cyan.underline(`http://${ip}:${(serverPort)}`);
console.log(`${EOL}DataHub server start at: ${host}${EOL}`);
return eggServer.startCluster({
workers: 1,
port: serverPort,
baseDir: __dirname,
});
}
}
require('egg').startCluster({
baseDir: __dirname,
workers: process.env.WORKERS,
port: process.env.PORT
});
const config = require('./config/config.default')
require('egg').startCluster({
baseDir: __dirname,
port: config.port,
workers: process.env.PORT || config.workers
})
process.env.VUE_ENV = 'server';
require('egg').startCluster({
baseDir: __dirname,
workers: process.env.WORKERS,
port: process.env.PORT
});