Skip to content

gRPC API pet project built on top of NestJS using DDD, CQRS, MikroORM and PostgreSQL

Notifications You must be signed in to change notification settings

Adrianmjim/nestjs-api-grpc-example

Repository files navigation

NestJS API gRPC Example

Nest Logo

Description

gRPC API pet project built on top of NestJS using DDD, CQRS, MikroORM and PostgreSQL

Requirements:

  1. Install NodeJS and pnpm

  2. Install dependencies

pnpm install
  1. Add an .env file based on .env.example

Database

We need a PostgreSQL instance to run the project. It's necessary to configure the environment variables for this database in the .env file. This project can also be launched with Docker Compose, which already includes the required database instance.

This repository uses MikroORM and its migration system. To apply the migrations, you need to run the following command:

npx mikro-orm migration:up

Usage:

You can start the app in development mode:

pnpm start:dev

Or in production mode:

  1. First, You need to build code:
pnpm build
  1. Then, You can start app:
pnpm start:prod

To run the current repository using Docker Compose, follow these steps:

  1. Build images
docker compose build
  1. Run services
docker compose up

Test

You can run test of this project:

pnpm test

About

gRPC API pet project built on top of NestJS using DDD, CQRS, MikroORM and PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Languages