Tenth and final project in the Team Treehouse Full Stack JavaScript Techdegree.
A .env
file must be present in the client app root directory with a random string value set to a variable named REACT_APP_SECRET_KEY
. An example has been committed to the repository by the name of .env.example
, but the actual file name when you start the app should be .env
. This value is used in the app to encrypt and decrypt passwords. You can either come up with your own super secret string, or generate a secure one by using an online hash generator (recommended).
NOTE: If you start the client server before adding the .env file, you will need to stop and restart it for React to read the file into memory.
To run the app locally, you'll need a MongoDB database setup. First, install dependencies for the API.
cd api
npm install
Ensure you have MongoDB setup on your local system.
- Open a
Command Prompt
(on Windows) orTerminal
(on Mac OS X) instance and run the commandmongod
(orsudo mongod
) to start the MongoDB daemon. - If that command failed then you’ll need to install MongoDB.
- How to Install MongoDB on Windows
- How to Install MongoDB on a Mac
Next, seed your MongoDB database with the provided seed data.
npm run seed
Then you can start the API app.
npm start
Finally, install dependencies and run the client app.
cd client
yarn install
npm start
Now you can browse to http://localhost:3000
in your preferred web browser.