Author: Andrew Enyeart
HTTP Express API server with endpoints that perform CRUD operations on a SQL database, deployed on Heroku here: aenyeart-basic-api-server.herokuapp.com
Most recent pull request: #2
To install, open your command line and run:
git clone git@github.com:aenyeart/basic-api-server.git
cd server-deployment-practice
npm install
To start the server on your local machine run:
npm start
To run the built-in tests on the server run:
npm test
Can be tested manually via ThunderClient or any HTTP client:
- GET
/foodreturns a list of Food objects - GET
/food/1returns the first Food object in the list - POST
/foodcreates a Food object, saves it to the list of foods - PUT
/food/2updates the second Food object - DELETE
/food/3deletes the third Food object
The routes for /tableware follow the same pattern as above.
-
Food:
-
Contains String: dishName
-
Contains Integer: quantity
-
Example:
{ 'dishName': 'wings', 'quantity': '24' }
-
-
Tableware:
-
Contains String: tablewareName
-
Example:
{ 'tablewareName': 'large plate' }
-
