/grape-alliance-case

Grape Alliance (Nodejs - Typescript) Case

Primary LanguageTypeScript

Grape Alliance Case

Node.js (Typescript) Express RESTful API case. It's already deployed to heroku with /api-docs you can reach to swagger doc

Installation

Clone the project

  git clone https://github.com/jack5341/grape-alliance-case.git

Go to the project directory

  cd grape-alliance-case

Install dependencies

  npm install

Start the server as production

  npm run prod

Or with Docker

  git clone https://github.com/jack5341/grape-alliance-case.git

Go to the project directory

  cd grape-alliance-case

Run docker-compose.yml

  docker-compose up -d

Running Tests

To run tests, run the following command

  npm run test

API Reference

Get all items

  GET /wine/:id/related
Parameter Type Description
id string Required. Wine Id

Get item

  GET /wine?${query}
Parameter Type Description
title string Wine title
country string Country of manufacture
color string Color of wine
winery string Winery of wine
page string Page counter for pagination
limit string Limit per page

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT

SERVICE_NAME

License

MIT

Documentation

Documentation