git pushyour 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.
PORTenvironment variable. Update index.js to read from
process.env.PORT, and set port to 3004 only if
PORTenv var doesn't exist, e.g. on our local machines.
startscript in package.json for Node.js apps. Add
pushthe repo code to Heroku:
mainbranch in the documentation code if your repo uses
mainas the default branch.