Make sure you have created a github repo for your project. Stage, commit, and push your files and changes to this github repo first. Then, from within the project directory:
-
$ heroku login//put in your credentials to log-in to heroku -
$ heroku create (app_name)//this should automatically set-up a remote on heroku to push to -
$ heroku addons:create heroku-postgresql:hobby-dev//this is required when deploying to heroku with a database -
$ git remote -v//confirms that you have a heroku remote available -
$ git push heroku master//push all your code/files up to heroku -
$ heroku run knex migrate:latest//now that your migration and seed files are all up on heroku, you can run your migration and seeds to build out your database -
$ heroku run knex seed:run -
Go into your heroku account through the brower. Find the project/app that you just set up. Click on "Open App".
The url in the browser window is your url to your root route.