Deploy YOSGO Dashboard on heroku. Skip to the bottom Our solution
- Heroku chinese note
- Same issue
- Procfile
- Work on local but not heroku
- Heroku node.js doc
- Port with heroku config
- Heroku command --> Find log
heroku logs --tail
- Heroku command --> Remote app
heroku git:remote -a APPNAME
- Heroku config --> NPM_CONFIG_PRODUCTION = false
For repeat change some tiny thing within one commit
git reset HEAD^
git add .
git commit -m 'Same NAME'
git push origin mater -f
heroku-postbuild
this script is for heroku build something. In package.json "heroku-postbuild": "Some cmd for build"
NPM_CONFIG_PRODUCTION = false
--> This will install the devDependencies packages
app.listen(process.env.PORT || 8080). The 8080
is for dev and the process.env.PORT
is for Heroku, Heroku will assign process.env.PORT
auto.
process.env.NODE_ENV
will be true on heroku!