Skip to content

A Menshop Backend Service using Nest.JS, MongoDB, Redis

Notifications You must be signed in to change notification settings

dino4608/menshop-backend

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications. (crtl + shift + v)

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Donate us Support us Follow us on Twitter

Description

Nest framework TypeScript starter repository.

Pre-condition:

$ node 18.19.1
$ redis 5.0.14

Project setup

$ npm install
$ redis-server

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Run tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Git branches

# master is default
$ git checkout master

# dev1 for user, auth, role, permission
$ git checkout dev1

# dev2 for product, sku, inventory, price,
$ git checkout dev2

# dev3 for shop, collection, brand, category, need
$ git checkout dev3

# dev3 for cart, purchase, discount
$ git checkout dev4

Apache benchmark (For loading/performance testing)

# guide to write a apache-benchmark-testing command
$ ab: run Apache benchmark
$ -n: number of requests
$ -c: number of concurrency (lượng users đồng thời gửi requests)
$ -H: custom-header
$ -T: content-type
$ -p: include-body

# example on CMD
>> ab -n 100 -c 100 `
>> -H "Authorization: Bearer X.ACCESS.TOKEN.DEMO.X" `
>> -T "application/json" `
>> -p ./test/apache/checkout.body.json `
>> http://localhost:8044/api/v1/client/orders/make-payment

Resources

Check out a few resources that may come in handy when working with NestJS:

  • Visit the NestJS Documentation to learn more about the framework.
  • For questions and support, please visit our Discord channel.
  • To dive deeper and get more hands-on experience, check out our official video courses.
  • Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
  • Need help with your project (part-time to full-time)? Check out our official enterprise support.
  • To stay in the loop and get updates, follow us on X and LinkedIn.
  • Looking for a job, or have a job to offer? Check out our official Jobs board.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.