open-index/open-npm huggingface dataset:
npm package: @lomray/microservice-nodejs-lib
Description: Package for create microservice architecture based on NodeJS & inverted json.
Author: Mikhail Yarmaliuk
Latest version: 3.0.0

# Microservice Node.js library

Package for create microservice architecture based on [Ijson job server](https://github.com/lega911/ijson).   
All requests are made through `JSON-RPC 2.0`

![npm](https://img.shields.io/npm/v/@lomray/microservice-nodejs-lib)
![GitHub](https://img.shields.io/github/license/Lomray-Software/microservice-nodejs-lib)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_microservice-nodejs-lib&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Lomray-Software_microservice-nodejs-lib)

### This package includes instruments for creating:
- Gateways
- Microservices
- Sockets

### Installation:
```bash
npm i --save @lomray/microservice-nodejs-lib
```

## Investigate
Take a look at [Microservices](https://github.com/Lomray-Software/microservices) to more understand how it works.

### Example
Go to `example` folder and check out the example of creating __microservice__ and __gateway__.
See `example/scratch.http` for understanding how to send requests.

1. install dependencies: `npm ci`
2. run ijson: `docker-compose up`
3. run 2 microservices - gateway & demo microservice: `node --require ts-node/register example/index.ts`

### How it works
![Diagram](example/diagram.png?raw=true "Diagram")
npm package: @lomray/microservices-cli
Description: CLI for working with microservices
Author: Mikhail Yarmaliuk
Latest version: 1.10.2

# CLI for [microservices](https://github.com/Lomray-Software/microservices)

![npm (scoped)](https://img.shields.io/npm/v/@lomray/microservices-cli)
![GitHub](https://img.shields.io/github/license/Lomray-Software/microservices-cli)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

The CLI is a command-line interface tool that helps you to initialize, develop, and maintain your microservices. It embodies best-practice architectural patterns to encourage well-structured apps.

Use `npx @lomray/microservices-cli -h` to view a list of available commands.

### Init new microservices project
```bash
npx @lomray/microservices-cli project-name
```

### Create new microservice
```bash
npx @lomray/microservices-cli create microservice-name
# or
microservices create microservice-name
```

### Create new microservice with DB support
```bash
microservices create microservice-name --with-db
```