【发布时间】:2016-03-28 18:21:58
【问题描述】:
我尝试在我的服务器上设置 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 端口上运行了 Sails 应用程序
但仍然航行环境发展
我需要改变环境来管理我的资产
我的 production.js 文件:-
appUrl:'http://myserver.me/'
models: {
connection: 'someMysqlServer'
},
port: 80,
当我使用时
sails.config.appUrl
输出 :- http://localhost:1337 从 development.js 返回而不是 production.js
【问题讨论】:
标签: node.js deployment sails.js