简体   繁体   English

如何在实时主机上运行“ Grunt serve”命令?

[英]How to run “Grunt serve” command on live hosting?

I have made one angular app. 我做了一个角度的应用程序。 this app in use grunt and run application using "Grunt Serve" command. 此应用正在使用grunt,并使用“ Grunt Serve”命令运行应用。 But, I have uploads this application on live hosting. 但是,我已经将此应用程序上传到实时主机上。 so, please help me... How to run "Grunt serve" command on live hosting? 因此,请帮助我...如何在实时主机上运行“ Grunt serve”命令?

Achieve that by following steps: 通过执行以下步骤来实现:

  • Make sure node.js is installed on hosting instance 确保在主机实例上安装了node.js
  • Make sure you app has proper package.json that contains grunt dependencies used by your app 确保您的应用程序具有正确的package.json ,其中包含应用程序使用的grunt依赖项
  • Connect to host machine and run npm install (via putty or ssh or ....) 连接到主机并运行npm install (通过puttyssh或....)
  • After packages are installed you can run grunt serve manually or you can put that command in postinstall script of package.json to auto run after npm install is done 安装软件包后,您可以手动运行grunt serve ,也可以将该命令放入package.json postinstall脚本中,以在npm install完成后自动运行

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

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