Skip to content

APE-Cave/basic-api-server

Repository files navigation

basic-api-server

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

Data Flow Diagram

Installation

To install, open your command line and run:

git clone git@github.com:aenyeart/basic-api-server.git
cd server-deployment-practice
npm install

Usage

To start the server on your local machine run:

npm start

To run the built-in tests on the server run:

npm test

Routes

Can be tested manually via ThunderClient or any HTTP client:

  • GET /food returns a list of Food objects
  • GET /food/1 returns the first Food object in the list
  • POST /food creates a Food object, saves it to the list of foods
  • PUT /food/2 updates the second Food object
  • DELETE /food/3 deletes the third Food object

The routes for /tableware follow the same pattern as above.

Features

  • Food:

    • Contains String: dishName

    • Contains Integer: quantity

    • Example:

      { 'dishName': 'wings', 'quantity': '24' }
  • Tableware:

    • Contains String: tablewareName

    • Example:

      { 'tablewareName': 'large plate' }

About

An Express API that performs CRUD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published