We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// server.js egg.startCluster({ baseDir: __dirname, workers: 1, port: 3000, }) egg.startCluster({ baseDir: __dirname, workers: 1, port: 4000, })
// app.js module.exports = app => { app.beforeStart(() => { // 配置 HTTPS 服务器 const httpsOptions = { key: fs.readFileSync(path.join(app.baseDir, 'app/config/ssl/key.pem')), cert: fs.readFileSync(path.join(app.baseDir, 'app/config/ssl/cert.pem')), }; const httpsServer = https.createServer(httpsOptions, app.callback()); httpsServer.listen(4000, () => { }); }); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
egg如何配置多个server实例
担心这种方式可能有问题,其他地方在对server进行操作时(如优雅退出等)得关心和操作多个server。
The text was updated successfully, but these errors were encountered: