products-service

Products-service handles the /products API endpoint for the FEC Project Atelier.

Technology Stack

TypeScript NodeJS FastifyPostgres DockerKubernetes

Running Locally

Products-service consists of two parts, an API server and a postgres instance.

Kubernetes

Requires a K8s cluster, we recommend using minikube for local development.

$ kubectl apply -f minikube.yaml

Docker Compose

$ docker compose up

From source

$ npm install
$ npm run ts:build      # compile TS files

$ ./download_csv.sh     # download csv files, warning: very large
$ ./load_db.sh          # load csv into postgres

Endpoints

GET /products

GET /products/:product_id

GET /products/:product_id/styles

GET /products/:product_id/related