gpt4 book ai didi

javascript - 如何永远运行 React Boilerplate

转载 作者:行者123 更新时间:2023-11-29 23:26:23 25 4
gpt4 key购买 nike

我要跑 react-boilerplate应用程序永远在服务器中。我找到了 forever而且我不确定如何将参数传递给永远。运行服务器的命令如下:

PORT=80 npm run start:production

似乎 forever start PORT=80 npm run start:production 对我没有帮助。

最佳答案

有一件事是PORT=80部分是设置环境变量,这种命令应该在其他命令的前面。另一件事是要永远运行 npm 脚本,你需要使用不同的语法,所以 PORT=80 forever start -c "npm run start:production"/path/to/app/dir/ .

如果你永远从项目文件夹运行,路径应该是./

关于javascript - 如何永远运行 React Boilerplate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49103568/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com