# shipme-backend
The ShipME back end RESTful API powers the retrieval and manipulation of ShipME application data, for use by the front end user interface.

The API is written in [Express](https://expressjs.com/) (JavaScript), and includes an installation of [Swagger UI](https://swagger.io/tools/swagger-ui/) for testing during development.

## Project Structure
The Express application targets [app.js](app.js), which serves the entire back end on port `3000`.

Here's some of the most important information to know about the back end project:

1. The ShipME API is defined in OpenAPI 3.0 spec found in [api_definition.yaml](api_definition.yaml).
2. Swagger UI is exposed on the `/` endpoint and is based on the API definition. It automatically builds the development interface as changes to the API definition are made.
    1. During development, Swagger UI can be accessed in a browser through [http://localhost:3000](http://localhost:3000).
3. The API methods themselves are exposed on the `/api` endpoint and match the API definition. They are defined in [routes/](routes/).
    1. For example: to retrieve all orders, make a `GET` request to [http://localhost:3000/api/orders](http://localhost:3000/api/orders).