An open API service indexing awesome lists of open source software.

https://github.com/p12s/product-store

🍔 Product-storage service, work on gRPC. Client sends the URL to download products, and requests the result. The server transfer request to a third-party resource for .csv-file uploading and saves the products to own database.
https://github.com/p12s/product-store

grpc-client grpc-server

Last synced: 5 months ago
JSON representation

🍔 Product-storage service, work on gRPC. Client sends the URL to download products, and requests the result. The server transfer request to a third-party resource for .csv-file uploading and saves the products to own database.

Awesome Lists containing this project

README

          

Product store


Product store. Task description is here

# 🔥 Run
Download:
```sh
git clone https://github.com/p12s/product-store.git && cd product-store
mv server/.env.example server/.env
mv client/.env.example client/.env

docker-compose up --build
```
Stop:
```sh
docker-compose down
```

# What is going on there
What does the client do:
- sending address to download products (for example, http://164.92.251.245:8080/api/v1/products/)
- requesting products with pagination functionality (limit, skip)
- requesting products continuously, simulate endless loading (based on bidirectional-stream)

What does the server do:
- going to the url, download and save the csv-file, extract the products from it, save to your database
- giving products with pagination functionality (limit, skip)
- giving away products in stream

Services are raised in docker-compose, the client starts and executes requests with output to the console, and then exits.
The server continues to work

# Separate services
[Client](client)
[Server](server)

Example external csv-product store source (**if still works**)
[swagger-doc](http://164.92.251.245:8080/api/v1/products/)
[products](http://164.92.251.245:8080/api/v1/products/)

If first resource isn't work - check this example:
[swagger-doc](https://github.com/p12s/csv-create-api/tree/master/docs)