Backend service built with NestJs 10. Includes unit tests to ensure robustness and efficiency.
- Clone the repository and then install required dependencies
git clone git@github.com:Pawa-IT-Solutions/cloud-mastery-backend.git
- Navigate to the target directory
cd cloud-mastery-backend
- Install dependencies
$ npm install
- Configure environment variables
cp .env.example .env
MYSQL_PRISMA_URL="mysql://username:password@localhost:3306/database_name?sslmode=require"
- Run database seed
npm run seed
- Generate Prisma Client
npx prisma generate
- 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
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
- Get Customers
curl -X GET http://localhost:PORT/api/v1/customers
- Get Products
curl -X GET http://localhost:PORT/api/v1/products
- Get Orders
curl -X GET http://localhost:PORT/api/v1/orders
# unit tests
$ npm run test