-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from blinkafrica/release
Release
- Loading branch information
Showing
4 changed files
with
116 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,82 @@ | ||
# Blink Base Service | ||
# Blink Octobus | ||
|
||
## Description | ||
![Github Actions](https://github.com/blinkafrica/octobus/actions/workflows/build-test.yml/badge.svg) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
|
||
This is the base service for the Blink project. It acts as a template for other services to be built on top of. It provides a basic structure for a service, including a database connection, a message queue connection, and a basic REST API. | ||
## About | ||
|
||
## Tools | ||
Octobus is a library that provides utility functions for building microservices such as: | ||
|
||
- Docker | ||
- RabbitMQ | ||
- NestJS | ||
- TypeORM | ||
- PostgreSQL | ||
- Interservice communication (via REST) | ||
- Subscribing to events from RabbitMQ queues. | ||
- Logging | ||
- Authentication | ||
|
||
## Installation | ||
## Getting Started | ||
|
||
These instructions will get you a copy of the project up and running on your local machine for development purposes. | ||
|
||
### Prerequisites | ||
|
||
The following are required for the best use of Octobus: | ||
|
||
- Package Dependencies | ||
- NodeJs (v14 or higher) | ||
- Yarn | ||
- Typescript (v4.4 or higher) | ||
- A basic understanding of nodejs and typescript with a good knowledge of nestjs would be an added advantage. | ||
|
||
### Installation | ||
|
||
To install Octobus, run the following command in your terminal | ||
|
||
```bash | ||
yarn install | ||
yarn install --save @blinkclaud/octobus reflect-metadata | ||
``` | ||
|
||
## Running the app | ||
To upgrade to a specific version run this command | ||
|
||
```bash | ||
# development | ||
$ yarn run start | ||
yarn upgrade @blinkclaud/octobus@version | ||
``` | ||
|
||
To upgrade to latest version run this command | ||
|
||
# watch mode | ||
$ yarn run start:dev | ||
```bash | ||
yarn upgrade @blinkclaud/octobus --latest | ||
``` | ||
|
||
# production mode | ||
$ yarn run start:prod | ||
> Note: Octobus requires Typescript (>= v4.4), as well as the `Decorator` experimental feature. Therefore, the following config options should be present in your `tsconfig.json` file: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2017", | ||
"lib": ["es2017", "esnext.asynciterable", "dom"], | ||
"types": ["reflect-metadata"], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true | ||
} | ||
} | ||
``` | ||
|
||
## Test | ||
## Guides | ||
|
||
```bash | ||
# unit tests | ||
$ yarn run test | ||
Below are links to detailed explanations to the various features of Octobus as well as practical examples: | ||
|
||
# e2e tests | ||
$ yarn run test:e2e | ||
- [HTTP (Interservice Comunication)](docs/HTTP.md) | ||
- [QueueManager (subscribing to RabbitMQ queues)](docs/Manager.md) | ||
- [Authentication](docs/Authentication.md) | ||
- [Logging](docs/Logging.md) | ||
|
||
# test coverage | ||
$ yarn run test:cov | ||
``` | ||
## References and Helpful Links | ||
|
||
## License | ||
The following links would further aid the understanding of Octobus | ||
|
||
Blink is [MIT licensed](LICENSE). | ||
- [Typescript Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) | ||
- [AMPQ Client docs for NodeJs](http://www.squaremobius.net/amqp.node/channel_api.html) | ||
- [Bunyan](https://github.com/trentm/node-bunyan#readme) | ||
- [Axios](https://axios-http.com/docs/intro) | ||
- [RabbitMQ messaging queues](https://www.rabbitmq.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters