Last active
July 7, 2020 18:21
-
-
Save mrsid96/fcdbeae30d282fa202358e03cea3650b to your computer and use it in GitHub Desktop.
AMPQ Connection
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
const amqp = require('amqp-connection-manager'); | |
require('dotenv').config(); | |
//process.env.mqConns is an array of connection string | |
let conn = amqp.connect(JSON.parse(process.env.mqConns)); | |
conn.on('connect', () => console.log('Connected!')); | |
conn.on('disconnect', err => console.log('Disconnected.', err)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment