Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curso-microservicios-nest/orders-ms
Orders microservice
https://github.com/curso-microservicios-nest/orders-ms
nats nestjs-microservices prisma
Last synced: 4 days ago
JSON representation
Orders microservice
- Host: GitHub
- URL: https://github.com/curso-microservicios-nest/orders-ms
- Owner: Curso-Microservicios-Nest
- Created: 2024-05-05T05:24:44.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T05:05:59.000Z (about 1 month ago)
- Last Synced: 2024-10-17T17:08:41.352Z (about 1 month ago)
- Topics: nats, nestjs-microservices, prisma
- Language: TypeScript
- Homepage:
- Size: 231 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orders - microservice
## Installation
```bash
npm install
```## 🚀Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## 💎Prisma - Migraciones
```sh
# Instalar el Cliente de Prisma
npm install @prisma/client# Configura e inicializa Prisma en el proyecto
npx prisma init# Ejecutar las migraciones y crear la base de datos
npx prisma migrate dev# Generar una nueva migración
npx prisma migrate dev --name MigrationName
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## 🐳 Docker
```sh
# Levantar la base de datos para las ordenes
docker-compose up -d
``````sh
# Crear el contenedor de NATS
docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 nats
``````sh
# Crear la imagen de producción
docker build -f Dockerfile.prod -t orders-ms .
```