Giter VIP home page Giter VIP logo

nodejs-rpc's Introduction

Simple Node-Express Application (Microservices)

Description

This project is a simple server side appliation written in Node.js and Express.js to demonstrate how microservices can communicate with each other through RPC calls.

Table of Contents

  1. Features
  2. Tech Stack
  3. Getting Started
  4. Usage
  5. Contribution
  6. Contact

Features

  • Efficient communication between microservices through RPC calls.
  • Timeout functionality for the API Request.

Tech Stack

  • Node.js: Backend Environment
  • Express.js: Backend Framework
  • RabbitMQ: Message Broker (for RPC functionality)

Getting Started

Prerequisites

Installation

  1. Clone the Repository:

    git clone https://github.com/Deval1807/Nodejs-rpc
    cd Nodejs-rpc
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    • Create a .env file in the root directory
    • Add your RabbitMQ URL
    RABBITMQ_URL = <your_RabbitMQ_URL>
    • If you are using it locally, the configuration will be:
    RABBITMQ_URL = 'amqp://localhost'
  4. Make sure to start your RabbitMQ service before starting the server, if you are using RabbitMQ locally.

    • If you have already installed RabbitMQ, directly search for RabbitMQ Service - Start and you will be able to start it.
  5. RabbitMQ Management Console

    • Once the service is start, go to http://localhost:15672 for the accessing the management console
    • If you are unable to access it, you will need to add a plugin for it
    • Open RabbitMQ command prompt and run the following command
      rabbitmq-plugins enable rabbitmq_management
    • Restart your service and it should be working ๐Ÿ˜„
  6. Start the server

    • Start products.js
      node src/products.js
    • Start customer.js in a new terminal
      node src/customer.js

Usage

  • Once the Server is running,

  • Visit the following link for Customer server

    • / : http://localhost:9000
    • /wishlist : http://localhost:9000/wishist
  • Visit the following link for Products server

    • / : http://localhost:8000
    • /customer : http://localhost:8000/customer

Contributing

We welcome contributions from the community. To contribute, please fork the repository, create a new branch, and submit a pull request. Make sure to follow the coding standards and ethical practices.

Contact

For questions or support, please contact Deval Darji by following ways:

  1. LinkedIn: Deval Darji

  2. Email: [email protected]

nodejs-rpc's People

Contributors

deval1807 avatar

Watchers

 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.