Under scripts in package.json I have the following.
scripts
package.json
'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