Skip to content

Haronmasebu1/cloud-mastery-backend

 
 

Repository files navigation

cloud-mastery-backend

Backend service built with NestJs 10. Includes unit tests to ensure robustness and efficiency.

Installations 25

  1. Clone the repository and then install required dependencies
git clone git@github.com:Pawa-IT-Solutions/cloud-mastery-backend.git
  1. Navigate to the target directory
cd cloud-mastery-backend
  1. Install dependencies
$ npm install
  1. Configure environment variables
cp .env.example .env
MYSQL_PRISMA_URL="mysql://username:password@localhost:3306/database_name?sslmode=require"
  1. Run database seed
npm run seed

Apply migrations

  1. Generate Prisma Client
npx prisma generate
  1. Create and Apply Migration
npx prisma migrate dev --name init

This will create a migration file based on your schema and apply the migration to your database

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Endpoints

  1. Get Customers
curl -X GET http://localhost:PORT/api/v1/customers
  1. Get Products
curl -X GET http://localhost:PORT/api/v1/products
  1. Get Orders
curl -X GET http://localhost:PORT/api/v1/orders

Test

# unit tests
$ npm run test

About

NestJs Backend service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.7%
  • Dockerfile 3.4%
  • JavaScript 1.9%