jjeskovs
11/6/2019 - 9:15 PM

React Project deploy full stock

Deployment

In this activity we will deploy the React Reading List application to Heroku.

Instructions

  • Deploy the React Reading List application to Heroku. Make sure to perform the following:

    • Initialize the project folder as a git repo by running a git init. if it does not work run rm -rf .git and then run git init

    • Add a .gitignore at the same level as your server.js and add the line node_modules as the content of this file. You may wish to base your .gitignore on an example like this.

    • Create a Heroku app for the React Reading List App. heroku create

    • Add a MongoLab Addon (MLab) for the React Reading List Heroku app.

    • If you would like to store your changes in a Git repo and you don't already have your folder linked up to GitHub, follow these steps. Make sure NOT to initialize this GitHub repository with either a README, license, or .gitignore.

    • Add git add .and commit git commit -m"delpoying" your changes before pushing up to Heroku (git push heroku master).

    • Once your site is deployed, you can seed your remote database by running the following commands: heroku run bash then node scripts/seedDB.js. Once this is complete, run exit to exit Heroku bash. Your database should now be seeded!

Hints

  • Make sure you add and commit all changes before pushing up to Heroku.

  • If your deployment fails, run heroku logs while in the project directory. This should print all of the logs produced from the failed deployment. Usually the issue can be found at the start of any errors.

  • Ask an instructor or TA for help if you get stuck. Help your neighbor if you finish early!