https://github.com/michelpl/ecommerce-discount-client
E-commerce discount client in Node.js
https://github.com/michelpl/ecommerce-discount-client
Last synced: 3 months ago
JSON representation
E-commerce discount client in Node.js
- Host: GitHub
- URL: https://github.com/michelpl/ecommerce-discount-client
- Owner: michelpl
- Created: 2021-06-28T15:32:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T03:28:24.000Z (almost 4 years ago)
- Last Synced: 2025-01-14T16:07:40.133Z (5 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## E-commerce discount GRPC client
## Description
E-commerce discount GRPC client is an API that works as a client for the discount service
## gRPC
[gRPC](https://grpc.io/) gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment.
## Requirements
- Nodejs
- Npm## Installation
**At the project root folder, run.**
1. `npm install`
## Usage
- To start the node server, run `npm start`.
- `E-commerce discount GRPC client` will be available on `localhost:2121`
- For get the discount value, just perform a GET request to the api root with the product id as query string `id={PRODUCT-ID}` lik the following command
```shell
curl --location --request GET 'http://localhost:2121?id=4'
```
>If the discount service is unavailable, the `E-commerce discount GRPC client` will returns the `503` http status code