我尝试在我的服务器上设置node_env = production 它没有用 当我试图运行时
sails lift --prod
我有错误
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
和帆在1337端口上运行 我使用此命令设置端口转发
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
现在我在80端口运行了风帆应用程序 但仍然环境发展 我需要改变环境来管理我的资产 我的production.js文件: -
appUrl:'http://myserver.me/'
models: {
connection: 'someMysqlServer'
},
port: 80,
当我使用
时sails.config.appUrl
输出: - http://localhost:1337从development.js返回而不是production.js
答案 0 :(得分:0)
我找到了这里提到的解决方案:How to add production mode to sailsjs app when started using PM2
pm2 start app.js -x --prod