简体   繁体   English

如何使用Node js在Google Cloud中运行项目

[英]How to run project in Google Cloud using Node js

如何使用Node js在Google Cloud Platform中运行新项目而又不需要一次又一次地针对Google Cloud Shell中的运行文件运行命令

You can install a supervisor module as explained in the StackOverflow answer . 您可以按照StackOverflow答案中的说明安装主管模块。

To install the supervisor module run below command: 要安装主管模块,请运行以下命令:

npm install supervisor -g npm安装主管-g

And then run you application with the command: 然后使用以下命令运行您的应用程序:

supervisor -e html,js app.js 主管-e html,js app.js

This will monitor all .html and .js files for any changes and update the content of your web pages without a restart of application. 这将监视所有.html和.js文件是否有任何更改,并在不重新启动应用程序的情况下更新网页的内容。 Of course, You will need to reload the web page. 当然,您将需要重新加载网页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM