!! Please download and install node.js from this link if you don't already have it set up: https://nodejs.org/en !!
-
Clone the repo onto your machine
-
Open the cloned repo in VS Code
-
Open the terminal in VS Code and type this line in:
npm install This line will grab all the saved modules in the package.json and install the modules
- Once all the modules are installed. Stay in VS Code terminal and type this line in:
npx nodemon OR npm start This line should default to running nodemon on the server.js
- Open this link in your browser:
- Feel free to look around the webapp
Login as admin to see both user and admin pages: email: a@e.com pw: pass
- To shut the server down, click onto the VS Code terminal and press:
Ctrl+C
- Press it twice to complete.
Details
- GET http://localhost:8000/shelters/all
Response is a JSON
- GET http://localhost:8000/shelters/:id
Response is a JSON Example: http://localhost:8000/shelters/3
Reponse: { "id": 3, "Name": "Greensboro", "Latitude": 36.0726, "Longitude": 79.7915, "Maximum_Capacity": 150, "Current_Capacity": 10 }
Response is JSON
- POST http://localhost:8000/shelters/createShelter
Body: JSON Example:
{ "Name": "Greensboro", "Latitude": 36.0726, "Longitude": 79.7915, "Maximum_Capacity": 150, "Current_Capacity": 10 }
Response is JSON