git push
your repo to the Heroku remote and Heroku runs a set of predetermined scripts so that your app is up and running. You can see their detailed docs here.cd
inside.PORT
environment variable. Update index.js to read from process.env.PORT
, and set port to 3004 only if PORT
env var doesn't exist, e.g. on our local machines.start
script in package.json for Node.js apps. Add start
to the scripts
section of package.json
.push
the repo code to Heroku:master
branch with main
branch in the documentation code if your repo uses main
as the default branch.