pegasuspect / TaskMicroServices

A backend service that runs on NodeJS on ExpressJS framework using sequelize for ORM to a mysql database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task Micro Services Unit Tests

A simple micro services architecture that runs on NodeJS on ExpressJS framework using Sequelize for ORM to a MySQL database, and occasionally sends notifications to a queue on RabbitMQ. There is also a consumer service that listens to the notifications from the queue on RabbitMQ.

Architecture Diagram

You can make updates to this diagram by importing this drawio xml file at draw.io

Architecture Diagram

Running Locally

You can simply run the following commands with Docker Desktop & git installed on your machine to start this microservices project with dummy data included!

git clone https://github.com/pegasuspect/TaskMicroServices.git
cd TaskMicroServices;
docker-compose build
docker-compose up -d

You will need to restart the api, and the consumer services after database and RabbitMQ Broker services started, due to premature connection requests. This could be prevented with a wait-for-it shell script. It would be out-of-scope of this project and complicate it unnecessarily. Instead a simple restart of the server & RabbitMQ consumer fixes this issue.

For individual service testing and development you can also find docker-compose files inside the subfolders that correspond to the micro service.

Documentation

Each service is seperated in their own folder. Each folder has a readme file for instructions on how to intialize and run locally.

Services

  1. MySQL Database with Adminer for Quick Web Inspection
  2. NodeJS Backend API
  3. RabbitMQ Notification Service
  4. NodeJS Notification Consumer Service

About

A backend service that runs on NodeJS on ExpressJS framework using sequelize for ORM to a mysql database.

License:The Unlicense


Languages

Language:JavaScript 98.3%Language:Dockerfile 1.7%