Skip to content

A simple NestJS REST CRUD API using PostgreSQL, PrismaORM, Zod, Docker, Pino Logger, Swagger OpenAPI Documentation, Unit and Integrations Tests using Jest

License

Notifications You must be signed in to change notification settings

AlexGalhardo/farm-nestjs-api

Repository files navigation

Farm NestJS API

farm-nestjs-api-development-setuo.mov

Technologies

Prerequisites

  • Node v22 and NPM v11
nvm install 22.9.0
nvm use 22.9.0
npm install -g [email protected]

Local Development Setup using Docker

  1. Clone repository
git clone [email protected]:AlexGalhardo/farm-nestjs-api.git
  1. Enter repository
cd farm-nestjs-api/
  1. Install dependencies
npm install
  1. Setup your environment variables
cp .env.example .env
  1. UP Docker with Postgres & API
sudo chmod +x setup.sh && ./setup.sh
  1. The Server API will start Inside docker connecting to your local machine at: http://localhost:3000

Prisma Studio (DataBase GUI)

  • To Start Prisma Studio:
npm run prisma:studio

Build

a. Creating build

npm run build

b. Testing build server locally

npm run start

API Requests and Docs

Tests

a. Run all unit mocked tests

npm run test
Screenshot 2025-06-06 at 16 24 05

b. Run all end to end tests

npm run test:e2e
Screenshot 2025-06-06 at 14 43 15

License

MIT

Copyright (c) June 2025-present, Alex Galhardo

About

A simple NestJS REST CRUD API using PostgreSQL, PrismaORM, Zod, Docker, Pino Logger, Swagger OpenAPI Documentation, Unit and Integrations Tests using Jest

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages