I had some trouble deploying my NestJS/Postgres server to Heroku. To save anyone else (and possibly my future self) the headache, here are the steps. Repo here for reference/cloning.
- Heroku account
- Heroku cli installed
- Repo running locally. (You can clone my example repo here)
- Local repo linked to local postgres db (not essential for the deploy but def recommended)
1. Create your app in heroku
In your app’s root directory create the heroku app with
heroku create <app-name>. Your app should now exist in heroku. Login to check.
2. Deploy your app
Heroku has a couple deployment options. You’ll most likely want to use the connect to GitHub option. Your…