dennisdegreef/mqtt-mongo-recorder


This NodeJS application listens to MQTT messages and records them to MongoDB

License: MIT

Language: JavaScript


mqtt-mongo-recorder

This NodeJS application listens to MQTT messages and records them to MongoDB

Example

Clone the repository

$ git clone https://github.com/dennisdegreef/mqtt-mongo-recorder.git
$ cd mqtt-mongo-recorder
$ npm install

Start up the server by editing the config.js first to suit your needs

$ $EDITOR config.js
$ node server.js

Or by using environment variables

$ MQTT_HOSTNAME="192.168.0.1" node server.js

Publish some MQTT messages to try it out (I use mosquitto server for this, but whatever MQTT server should work)

$ mosquitto_pub -m "bar" -t "foo"

Let's see what's in here

$ mongo
> use mqtt
> db.message.find();

Project Statistics

Sourcerank 3
Repository Size 109 KB
Stars 5
Forks 5
Watchers 1
Open issues 1
Dependencies 2
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Dennis de Greef

Something wrong with this page? Make a suggestion

Login to resync this repository