2.0.1 • Published 6 years ago

amqpuri v2.0.1

Weekly downloads
3,742
License
MIT
Repository
github
Last release
6 years ago

amqpuri

Greenkeeper badge Build Status codecov.io js-semistandard-style code style: prettier MIT License

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:guest@dev.rabbitmq.com: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