SergeySharipov / back-end-assignment-brewery

Home Page:https://back-end-assignment-brewery.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

back-end-assignment-brewery

Documentation

Run

Install dependences: npm install

Production: npm start
Development: npm run dev
Test: npm run test

Request

Route: /breweries
Method: GET
Query Parameters:
Query Parameters

Successful Response:

Response body (JSON):

{
  "data": [
    {
      "id": "10-56-brewing-company-knox",
      "name": "10-56 Brewing Company",
      "brewery_type": "micro",
      "street": "400 Brown Cir",
      "address_2": null,
      "address_3": null,
      "city": "Knox",
      "state": "Indiana",
      "county_province": null,
      "postal_code": "46534",
      "country": "United States",
      "longitude": "-86.627954",
      "latitude": "41.289715",
      "phone": "6308165790",
      "website_url": null,
      "updated_at": "2021-10-23T02:24:55.243Z",
      "created_at": "2021-10-23T02:24:55.243Z"
    },

]
}

Response status code: 200

Error Responses:

If type_of parameter is invalid:
Response body (JSON):

{
"error": "type_of parameter is invalid"
}

Response status code: 400.

If nothing is found:
Response body (JSON):

{
"error": "Not Found"
}

Response status code: 404.

If route is invalid:
Response body (JSON):

{
"error": "Unknown Route"
}

Response status code: 404.

About

https://back-end-assignment-brewery.herokuapp.com/


Languages

Language:JavaScript 99.9%Language:Procfile 0.1%