Backend API
Last updated
Was this helpful?
Last updated
Was this helpful?
Now that we have our basic app set up, we can go ahead to initialize git and create our heroku app, if you don’t already have heroku setup on your computer or you are completely new to heroku, follow this ( to create an account and setup your computer.
Now when you login to your heroku dashboard, you should see your newly created app there like mine
lets make a quick list of things we need to do to configure our heroku app to work properly:
Create a Procfile
Setup mysql database
Configure our app to use the mysql database
1. Create a Procfile
All Heroku applications run in a collection of lightweight Linux containers called dynos. Creating a ‘ Procfile’ at the root of our app directory would enable us to specify the commands that are exceuted by the app’s dynos. You can read up on dynos here . Also for more information on Procfile read this article .
Next create a procfile at the root of the app’s directory, and enter the following:
2. Setup mysql database by adding the JawsDB MySQL addon
Navigate to the resources tab in the heroku dashboard, search for “JawsDB MySQL” under addons and select “JawsDB MySQL”.
Select the plan you want, we would use the free hobby dev plan here and click provision.
We should now have a new entry in our environment variables. Navigate to the settings tab and click “Reveal config” vars button to display the environment variables.
3.Final Step