Skip to content

eccomerce-micro-service-nodejs

Notifications You must be signed in to change notification settings

dappsar/ecommerce-micro-service-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node express mongo-db nginx microservices docker react redux

eCommerce micro-service app

Introduction

A practical example of NodeJS Microservices Architecture.

it is a simple eCommerce Application using Microservices Architecture without impact frontend. So each individual services will work independently to server the purpose and business logic.

architecture

Folder description

Technology Stack & Tools

  • Visual Studio Code
  • nvm / nodejs / npm / npx
  • Javascript (React & Testing)
  • Express
  • MongoDb
  • Studio 3T
  • reactjs, Redux
  • micro-services
  • nginx
  • docker, docker-compose
  • jest-js
  • cloudamqp

Requirements For Initial Setup

Setting Up

1. Clone/Download the Repository

$ git clone repo_url

2. Install Dependencies

$ npm install (in each folder: app, customer, shopping, products)

3. Configure env variables

  • Create .env.dev file in each folder (app, customer, shopping, products).
  • Set the value of the variables based on the example file sample_env.

4. Start services

$ docker-compose -f docker-compose.yml up

5. Start app

  • dev:

    $ npm run start

    Important note: Take care that the app has setted only one url base + port to all services in code, assuming services are started with a reverse proxy (nginx). So, if you start each service in separate url and port, the app will not work for you.

6. Run tests

$ npm run test

7. Postman endpoints

See postman json file in ./.doc/pstman


References

  • EXDkgjU8DDU