您的位置:首页技术文章
文章详情页

javascript - 求解:nodejs 环境变量NODE_NEV 产模式启动发出警告

浏览:35日期:2023-08-26 18:22:26

问题描述

如果用开发模式启动程序是没有问题的,但是切换到生产模式就会抛出以下错误:

Warning:connect.session() MemoryStore is not designed for a production environment, as it will leakmemory, and will not scale past a single process.server connect,the port:3030

问题解答

回答1:

内存泄漏风险的警告,不要直接在宿主机的内存中存放 session 等缓存数据。

标签: JavaScript
相关文章: