To use this API locally, run the following command in your terminal:
Then, run the following command:
npm install
To run the app, run:
node server.js
Then, you may go to http://localhost:3001/
in your browser to view responses.
Returns all projects stored in the database.
- Method: GET
- Path: '/api/v1/projects'
[ { "id": "1", "name": "victorian house" }, { "id": "2", "name": "palm tree" }, { "id": "3", "name": "project 3" } ]
Returns a specific project with the id entered as a parameter.
- Method: GET
- Path: '/api/v1/projects/:id'
{ "id": "1", "name": "victorian house" }
Returns a specific project's palettes.
-
Method: GET
-
Path: '/api/v1/projects/:id/palettes'
-
Method: GET
-
Path: '/api/v1/projects'
{ "id": "1", "name": "victorian house" }
Method: POST
Path: /api/v1/projects
{ "newProject": { "name": "project 3" } }
Method: POST
Path: /api/v1/projects/:id
{ "newPalette": { "name": "warm palette", "color_1": "FFFFF", "color_2": "FFFFF", "color_3": "FFFFF", "color_4": "FFFFF", "color_5": "FFFFF" } }
Method: PATCH Path: '/api/v1/projects/:id'
{ "updatedProject": { "id": "1", "name": "georgia" } }
Method: PATCH
Path: /api/v1/projects/palettes/:id
{ "updatedPalette": { "name": "blueberries", "color_1": "FFFFF", "color_2": "FFFFF", "color_3": "FFFFF", "color_4": "FFFFF", "color_5": "FAFAF", } }
Method: DELETE
Path: /api/v1/projects/:id
Method: DELETE
Path: /api/v1/projects/palettes/:id