我尝试在我的服务器上设置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
1 回答
我找到了这里提到的解决方案:How to add production mode to sailsjs app when started using PM2