octonet is a library that provides utility functions for building microservices such as:
- Interservice communication (via REST)
- Subscribing to events from RabbitMQ queues and NATS servers.
- Logging
- Authentication
These instructions will get you a copy of the project up and running on your local machine for development purposes.
The following are required for the best use of Octonet:
- Package Dependencies
- NodeJs (v14 or higher)
- Yarn
- Typescript (v4.4 or higher)
- A basic understanding of dependency injection with Inversify
To install Octonet, run the following command in your terminal
yarn install --save @risemaxi/octonet reflect-metadata
To upgrade to a specific version run this command
yarn upgrade @risemaxi/octonet@version
To upgrade to latest version run this command
yarn upgrade @risemaxi/octonet --latest
Note: Octonet requires Typescript (>= v4.4), as well as the
Decorator
experimental feature. Therefore, the following config options should be present in yourtsconfig.json
file:
{
"compilerOptions": {
"target": "ES2017",
"lib": ["es2017", "esnext.asynciterable", "dom"],
"types": ["reflect-metadata"],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
Below are links to detailed explanations to the various features of Octonet as well as practical examples:
- HTTP (Interservice Comunication)
- NatsConsumer (subscribing to Nats topics)
- QueueManager (subscribing to RabbitMQ queues)
- Authentication
- Logging
The following links would further aid the understanding of Octonet