rabbit-response
v1.0.1
Published
fast, easy, clean framework for micro services using rabbitmq
Downloads
7
Maintainers
Readme
Rabbit Response
Rabbit Response is a framework designed to help you build advanced micro-service systems using
Quick, Easy to read, Linear JavaScript.
const result = await rr.get('complicatedAlgorithm',data);
Installation
This is a Node.js module available through the npm registry.
Installation is done via the npm install command:
$ npm install rabbit-response
You will also need an instance of RabbitMQ to connect to.
If you don't have one, the easiest way to spin one up is using Docker.
docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3
- If you don't have docker installed check out Docker home page
Documentation
Examples
We have several Examples. Here is the first one to get you started.
const rabbitResponse = require('rabbit-response');
const rr = rabbitResponse();
rr.consumeQueue('getStringQueue',(req,res)=>{
res.send('Hello World');
});
const app = async () =>{
const stringToPrint = await rr.get('getStringQueue');
console.log(stringToPrint);
};
app();
This example will print "Hello World" to console.
You may notice the code is in a single file.
To learn how to separate services check out the Getting Started section.