/nest-js-ecommerce-mongoose

Minimalist ecommerce, with NestJS & MongoDB.

Primary LanguageTypeScript

Nest Logo

MercadoLibre Clone [Ecommerce]

This is a project that starts from a migration from NodeJS and Express, to Nest, adding functionalities in order to achieve a robust, scalable, and salable project.

Main features: Products, Brands, Categories, Subcategories, Comments, Users, Payment System (Sale-Purchase).

Starting πŸš€

These instructions will allow you to get a working copy of the project on your local machine for development and testing purposes.

See Deployment to learn how to deploy the project.

Pre-requisites πŸ“‹

What things do you need to install the software and how to install them

- Git v2.35.0.
- NodeJS v16.13.2
- NestJS v8.2.0

You can download these technologies from the following links:

Installation πŸ”§

A series of step-by-step examples that tell you what you need to run to get a development environment running

Install Git
Install Node
npm i -g @nestjs/cli

Now you are ready to open and run the project

git clone https://github.com/brahianpdev/nest-js-ecommerce-mongoose
cd nest-js-ecommerce-mongoose
npm install 
npm run start:dev

Deployment πŸ“¦

A brief guide on how to deploy on Heroku.

Download and install the Heroku CLI.

heroku create
heroku config:set NPM_CONFIG_PRODUCTION=false
heroku config:set HOST=0.0.0.0
heroku config:set NODE_ENV=production

In your package.json, add this line:

"scripts": {
  "heroku-postbuild": "npm run build"
}

Create a file called Procfile at the root of your project, and type the following:

web: npm run start

Push your github repository to heroku to deploy

git add Procfile
git commit -a -m "Configuration to deploy to heroku"
git push heroku master

And it’s live. The push-and-deploy process takes a few minutes, and then Heroku gives you the URL where you can see your app.

Endpoints πŸ”Ž

You can see all the documentation of the endpoints HERE


Built with πŸ› οΈ

Menciona las herramientas que utilizaste para crear tu proyecto

  • NestJS - Backend framework used
  • MongoDB - Used as my database
  • Mongoose ODM - Used to create the models of my database
  • Postman - Used to test and document my endpoints
  • NPM - Dependency manager

Expressions of Gratitude 🎁

This project is a test in order to expand my knowledge in a new framework through good SOLID practices.

A special thanks to Franco and Scorpion, who are always offering their help.


⚠️ If you run into any problems, please let me know HERE.