This project is a NestJS-based e-commerce application. It demonstrates how to build a simple e-commerce store using NestJS, a popular Node.js framework for building scalable web applications. The project includes a product module, a cart module, and a database to store the data.
Before starting, ensure that you have Node.js and NestJS installed. You can install NestJS globally using the following command:
npm install -g @nestjs/cli
- Clone the project from the GitHub repository[1].
- Install the required dependencies by running:
npm install
To run the project, use the following commands:
nest start
or
npm run start
This will start the backend server on port 3000. You can access the API documentation at localhost:3000/docs
.
To run tests for the project, use the following command:
npm run test
This will run the tests defined in the src/test/**/*.ts
files.
npm run test -- test/unit/*.spec.ts
To deploy the project, you can use a service like Heroku. Follow the instructions in the [LogRocket Blog tutorial][1] to deploy the NestJS e-commerce app on Heroku.
For more information on using NestJS, refer to the [official NestJS documentation][3].
Citations: [1] https://blog.logrocket.com/how-build-ecommerce-app-nestjs/ [2] https://blog.logrocket.com/build-project-using-angular-nestjs/ [3] https://www.reddit.com/r/node/comments/zxzzzj/does_anyone_know_any_samples_of_projects_related/?rdt=45045 [4] https://youtube.com/watch?v=GHTA143_b-s
docker build -t app:v1.0.0 .
docker run --name shop -p 3000:3000 app:v1.0.0