Microservice

screenshot of Microservice

Microservice

template for microservice

Overview

The Microservice template is designed to automate the generation of components for backend construction. It utilizes the concept of a message broker and provides a CLI for easy execution of commands.

Features

  • Automated commands for generating backend components
  • Utilizes a message broker for efficient communication
  • CLI for easy execution of commands
  • Dependency management using Yarn or NPM
  • Global alias configuration for modules and shared paths
  • Support for running unit and integration tests
  • Easy setup and connection to RabbitMQ message broker
  • Environment variable configuration
  • Conventional commit linting for maintaining clean commit history

Installation

  1. Install the required dependencies:
yarn install

or

npm install
  1. Use the CLI with Yarn:
yarn run <command>
  1. Use the CLI with NPM:
npm run <command>
  1. To install and manage new packages, use Yarn:
yarn add <package-name>
  1. To define global aliases, modify the following files with the desired paths:
  • tsconfig.json
  • jest-e2e.json
  • jest.config.json
  1. To run unit tests, use the following command:
yarn test
  1. To run integration tests, use the following command:
yarn run test:integration
  1. To run the application in watch mode, use the following command:
yarn run watch
  1. To run the application, use the following command:
yarn start

Summary

The Microservice template provides automated commands for generating backend components and utilizes a message broker for efficient communication. It offers a CLI for easy execution of commands and supports dependency management using Yarn or NPM. The template also includes features such as global alias configuration, unit and integration testing, easy setup and connection to RabbitMQ, environment variable configuration, and conventional commit linting.