如何在部署的Heroku NodeJS应用程序上运行npm脚本 [英] How to run a npm script on a deployed Heroku NodeJS app

查看:108
本文介绍了如何在部署的Heroku NodeJS应用程序上运行npm脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

package.json 中的脚本下,我有以下内容。

'refresh':node refresh db



有没有办法在部署在Heroku上的NodeJS应用程序上触发这个特定的npm脚本。

解决方案

是:

  $ heroku run npm run refresh 


Under scripts in package.json I have the following.

'refresh': node refresh db

Is there a way to trigger this particular npm script on a NodeJS app deployed on Heroku.

解决方案

Yes:

$ heroku run npm run refresh

这篇关于如何在部署的Heroku NodeJS应用程序上运行npm脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆