node.jsherokunpmheroku-toolbelt

How to run a npm script on a deployed Heroku NodeJS app


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.


Solution

  • Yes:

    $ heroku run npm run refresh