API Gateway to take all messages from any publisher and send to correspondient kafka topic
This API provide two principal enpoints:
- %URL_BASE%/api/persons/customers
- %URL_BASE%/api/persons/persons
- %URL_BASE%/api/products
This POST enpoints recive an input with this format:
{
"origin": "POSTMAN",
"content": "any related json to /comerce/xxxxx use case",
}
[1] Firs clone the repo locally [2] run -> pnpm install or yarn install [3] run dev command
```
yarn dev
```
[4] Additionally if you have dockerhub installed. We leave you a dockerfil ready!! pleasse ref to Dockerize
You can use docker to deploy the api server. In this releasse we leave a dockerfile and a docker compose ready to use
- generate image
docker image build -t moviedomfo/express_comerce .
- run container
docker run -d -p 3026:3016 --name express_comerce moviedomfo/express_comerce
docker-compose up -d
-
which volume: First you need to create the maping in thge docker compose files for each container that you need volumes:
- /e/volumens/express/orders:/app/files
run container maping to comerce_files created volume
-
Navigate to this url to check the if correctly docker container is running http:https://localhost:3008
Para documentar los controllers debemos usar tsoa "build-tsoa": "tsoa spec-and-routes" genera las Rutas en base a los controllers documentados con los docoradores tsoa "predev": "npm run swagger", genera el json para que swagger levante la pagina con la documentacion
Hay que ver que tenemos configurado en ./tsoa.json para ver el destino de la transpilacion de las rutas
To generate Routes class run
pnpm build-tsoa
sequelize, tedious,