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.
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.
You can also do this using only the browser; Just log in to manage your app in the heroku dashboard (https://dashboard.heroku.com/apps/[app_name]
) and there click on the right side of it:
More > Run console
Then you can run any command: command line in heroku
© 2022 - 2024 — McMap. All rights reserved.