|
||
---|---|---|
.vscode | ||
.woodpecker | ||
src | ||
tests | ||
.gitignore | ||
biome.json | ||
bun.lockb | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.build.json | ||
tsconfig.json |
nano-service
nano-service
is a lightweight, efficient messaging library written in TypeScript, enabling seamless communication between services using message brokers. It is designed to integrate with the NATS messaging system, providing an easy-to-use API to create a robust microservices environment.
Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed Node.js 20 or higher. You can download and install Node.js from nodejs.org.
- You have a working knowledge of TypeScript.
- You have access to a NATS server (if you're planning to use the library in a production environment).
Development
To start working with nano-service
, you need to clone the project and use it in your TypeScript applications. Follow these steps:
Clone the repository
Start by cloning the nano-service
repository to your local machine. Use the following command:
git clone https://gitea.qpismont.fr/qpismont/nano-service
Navigate to the cloned repository
cd nano-service
Link the library
In the nano-service
directory, use npm to create a symbolic link to the library globally on your system:
npm link
This command makes the nano-service
library available globally on your machine.
Using nano-service in your project
Navigate to your project's directory where you want to use nano-service
. You can then link the globally linked nano-service
library to your project using the following command:
npm link nano-service
This command links the nano-service
package to your project, allowing you to import and use it in your TypeScript files.
Testing
This project uses Jest for testing. To run tests, navigate to the project directory and run:
npm run test
Ensure any new code contributions are well-tested through Jest.
Linting
The project utilizes ESLint
to maintain a consistent, high-quality codebase. To lint the project, execute:
npm run lint
Please ensure your contributions adhere to the established ESLint rules.
License
nano-service
is available under the MIT License. See the LICENSE file for more info.