Tag: 永远的

“永远”的node.js安装,但不再工作

一两天前,我用npm安装了“ forever ”包,并且永远CLI按预期工作。 然而,今天当我试图永远使用(使用命令forever start app.js ),它给了以下错误消息(格式化我的): forever : The term 'forever' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 我已经尝试过永久重新安装,npm / node.js和Visual Studio Code(我当前的IDE /文本编辑器),但是这些都不起作用。 也没有重新启动我的电脑。 […]

在Forever中运行的NodeJS应用程序在浏览器中获取502错误

我有一个Webfaction服务器上设置的SailsJS应用程序。 当我通过以下任一命令运行应用程序(无论是否使用–prod param)时,一切正常(可通过浏览器访问站点) sails console , sails lift , node app.js 但是,当我尝试运行应用程序永远使用forever app.js我得到一个502错误,好像nodejs服务器甚至没有运行。 当我forever list运行forever list我可以看到正在运行的进程中列出的app.js。 我怎样才能使我的应用程序永远运行?

远程nodejs服务器部署永远

我试图通过post-commit钩子在远程机器上部署节点js服务器,该钩子将在实际部署的远程机器上调用脚本。 我面对的问题是,如果我在机器上运行远程脚本工作正常,但是当我尝试通过SSH命令执行相同的脚本服务器不启动。 这是我的后提交钩子看起来像: #!/bin/bash #Connect to AWS machine and run deploy script ssh -i ~/Documents/aa-kp-inst1.pem ubuntu@<remote-ip> "sh /home/app/deploy.sh" #Done exit 0 非常简单 这就是deploy.sh的样子: #!/bin/bash #Navigate to server directory cd /home/app/personal_website/server #Stop currently running server(s) forever stop -s 0 >> forever.log #Pull latest code unset GIT_DIR git -C /home/app/personal_website/server pull –quiet #Restart server forever start -a […]