amqpuri
v2.0.1
Published
Create AMQP URIs the node way
Downloads
4,022
Maintainers
Readme
amqpuri
Create AMQP URIs as you would with node's url
Install
npm i --save amqpuri
This module does not support
node < 6.0.0
. If you need to install this in older versions, consider using amqp-uri
Usage
const amqpuri = require('amqpuri');
const uri = amqpuri.format({
hostname: 'dev.rabbitmq.com',
port: 5672,
vhost: 'seneca',
username: 'guest',
password: 'guest',
frameMax: 1024,
channelMax: 1000,
heartbeat: 500,
locale: 'en_US'
});
console.log(uri);
// amqp://guest:[email protected]:5672/seneca?frameMax=1024&channelMax=1000&heartbeat=500&locale=en_US
Test
To run tests, clone the repository, install dependencies and call the appropriate npm
script.
git clone https://github.com/nfantone/amqp-uri.git amqpuri
cd amqpuri
npm i
npm test
License
MIT