Deploy to production


When hosting your server on Heroku you need make sure to:

Next login or sign-up for Heroku and configure your app:

Create a new app from the top menu and set your app name and preferred region where the server is hosted:

Deploy your by connecting via Github or using the Heroku CLI. This will import your code to heroku and will automatically rebuild your app when changes are pushed to your repo.

As a final step you need to set your environment variables.

Navigate to "Settings" and reveal the keys. Here you can paste all the variables from your .env file. Make sure that these variables are production-ready (no references to localhost, and different database that used in local development)


Make sure to update SERVER_URL in the config vars to the deployed url on Heroku. This looks something like Also make sure to set this same serverUrl in your frontend.

Did this page help you?