To run the api, firstly ensure MongoDB is installed and running locally. To see how to do this follow these instructions
add an alias to the .zshrc
file to be able to create shortcuts for commands
- to start mongo:
alias startmongo="brew services start mongodb-community"
- to stop mongo:
alias killmongo="brew services stop mongodb-community@"
Once the database is running locally:
- Install dependencies -
npm install
- Seed the database -
npm run seed
- Start the server -
npm run start:server
It may help to have nodemon
installed globally on your machine
npm i -g nodemon
Once the server is running and successfully connected to the database, you will be able to test making requests to the api using postman.
Try sending a request to http://localhost:3000/api/movies
and you should see data returned
- Build the home page with them to show them how to fetch data locally
- Show them wireframing tools - Balsamiq
- Set up a trello board
- Put them in groups
- One person should push their classwork into a git repo and all of them should pull it down
- Get them to write tickets and work together to start creating a fontend
Use this article