https://github.com/robertoachar/node-rabbitmq
A playground for Node and RabbitMQ.
https://github.com/robertoachar/node-rabbitmq
microservice node rabbitmq
Last synced: 11 months ago
JSON representation
A playground for Node and RabbitMQ.
- Host: GitHub
- URL: https://github.com/robertoachar/node-rabbitmq
- Owner: robertoachar
- License: mit
- Created: 2017-09-17T14:49:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T16:23:55.000Z (over 8 years ago)
- Last Synced: 2025-02-17T10:21:48.757Z (about 1 year ago)
- Topics: microservice, node, rabbitmq
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Node with RabbitMQ
Generated by [OSS Project Generator](http://bit.ly/generator-oss-project).
[![License][license-badge]][license-url]
> A playground for Node and RabbitMQ.
# Installation
## Windows Installation
* Install Node.js: [node-v8.5.0-x64.msi](https://nodejs.org/dist/v8.5.0/node-v8.5.0-x64.msi)
* Install Erlang : [otp_win64_20.0.exe](http://erlang.org/download/otp_win64_20.0.exe)
* Install RabbitMQ: [rabbitmq-server-3.6.12.exe](https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_12/rabbitmq-server-3.6.12.exe)
* Update npm (current version v5.3.0)
```bash
$ npm i -g npm@5.3.0
```
## Enable RabbitMQ Management Plugin (optional)
```bash
$ cd C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin
$ rabbitmq-plugins enable rabbitmq_management
```
Browser to: [http://localhost:15672](http://localhost:15672)
* Username: guest
* Password: guest
# Development
* Cloning the repo
```bash
$ git clone https://github.com/robertoachar/node-rabbitmq.git
```
* Installing dependencies
```bash
$ npm install
```
* Running scripts
Action | Usage
------ | -----
Linting code | `npm run lint`
# Usage
* Hello World
```bash
# producer
$ node src/hello-world/producer.js
# consumer
$ node src/hello-world/consumer.js
```
# Troubleshooting
## Installing as a non-administrator user leaves .erlang.cookie in the wrong place
This makes it impossible to use `rabbitmqctl`.
Workarounds:
* Run the installer as an administrator _or_;
* Copy the file `.erlang.cookie` manually from `%SystemRoot%` to `%HOMEDRIVE%%HOMEPATH%`.
* Restart service (stop and start)
# Author
[Roberto Achar](https://twitter.com/robertoachar)
# License
[MIT](https://github.com/robertoachar/node-rabbitmq/blob/master/LICENSE)
[license-badge]: https://img.shields.io/github/license/robertoachar/node-rabbitmq.svg
[license-url]: https://opensource.org/licenses/MIT