Skip to content

GETUCHALA20/simple-ecommerce-api

Repository files navigation

Ecommerce-restfull-api

Basic RESTful api for ecommerce where you can add/delete your item and add item to cart after authorization.

DESCRIPTION

  • Built a REST Api in Node.js using MVC approch using Nest.js + MongoDB.
  • JWT for Authetication and Authorization.

BASIC REQUIREMENTS

  • Node.js 6.11.2
  • MongoDb

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

App should now be running on localhost:5000

Swagger API documentation should now be running on localhost:5000/api

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Available API Routes

Routes Description
GET/items/ Get list of all items
POST/items/ Post a new item
GET/items/{itemId} Get details of a particular item.
PATCH/items/{itemId} Update a particular item
DELETE/items/{itemId} Delete a particular item
Routes Description
POST/user/signUp Sign up a new user
POST/auth/login Login a user
Routes Description
GET/cart/{userId} Get cart detail of a user
POST/cart/addItem Post a new item to cart
POST/cart/removeItem/{itemId} Post remove a particular item from cart

nestjs-mongo-docker

(Nest + mongo) with Docker compose

Run

npm run init

Visit your browser in: http://localhost:5000/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published