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
Per the Heroku Node.js Documentation, you can add pre and post install scripts. In addition, you can add scripts that can be triggered by environment variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With