Giter VIP home page Giter VIP logo

microservices-using-nodejs-mongodb's Introduction

Microservices

A basic application to demonstrate the microservices architecture using books store management.

image

Prerequisites before run the project

  • install latest version of nodejs
  • install latest version of mongodb
  • Good to have postman installed to test the microservices.

Commands

Name Description
npm run startuserserver Starts user server
npm run startbookserver Starts book server
npm run startorderserver Starts order Server
npm test unit Starts unit tests
npm test integration Starts integration tests

How to test

import postman collection in postman and test. you can find the postman collections here. https://github.com/bitakeyogesh/microservices-using-nodejs-mongodb/tree/main/postman

Users API

API Method Description
/api/v1/user/add POST Add new user
/api/v1/users GET Get all the users
/api/v1/user/:uuid GET Get user by id
/api/v1/user/:uuid PUT Update user by id
/api/v1/user/:uuid DELETE Delete user by id

Books API

API Method Description
/api/v1/book/add POST Add new book
/api/v1/books GET Get all the books
/api/v1/book/:uuid GET Get book by id
/api/v1/book/:uuid PUT Update book by id
/api/v1/book/:uuid DELETE Delete book by id

Orders API

API Method Description
/api/v1/order/add POST Add new order
/api/v1/orders GET Get all the orders
/api/v1/order/:uuid GET Get order by id
/api/v1/order/:uuid PUT Update order by id
/api/v1/order/:uuid DELETE Delete order by id

Environment Variables

Name Description
USERS_API_PORT Users API port. If it is not specified defaults to 8082
BOOKS_API_PORT Books API port. If it is not specified defaults to 8080
ORDERS_API_PORT Orders API port. If it is not specified defaults to 8081
BOOKS_API_DATABASE_NAME Name of the books database. If it is not specified defaults to BOOKS
ORDERS_API_DATABASE_NAME Name of the orders database. If it is not specified defaults to ORDERS
USERS_API_DATABASE_NAME Name of the users database. If it is not specified defaults to USERS
USER_API_ENDPOINT users api endpoint.If it is not specified defaults to http://localhost:8082
BOOK_API_ENDPOINT book api endpoint. If it is not specified defaults to http://localhost:8080
ORDER_API_ENDPOINT order api endpoint. If it is not specified defaults to http://localhost:8081

microservices-using-nodejs-mongodb's People

Contributors

bitakeyogesh avatar

Stargazers

 avatar Aloysius Gilang Pramudya avatar Qumail Rafiq avatar Victor Ray avatar Ethan Baron V. avatar  avatar  avatar Asrorbek Shakhobiddinov avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.