Skip to content

Instantly share code, notes, and snippets.

@jaydp17
Last active December 10, 2015 15:09
Show Gist options
  • Save jaydp17/f500d1a0da7ed108a42c to your computer and use it in GitHub Desktop.
Save jaydp17/f500d1a0da7ed108a42c to your computer and use it in GitHub Desktop.
A simple server using mosca
var mosca = require('mosca')
var ascoltatore = {
//using ascoltatore
type: 'mongo',
url: 'mongodb://localhost:27017/mqtt',
pubsubCollection: 'ascoltatori',
mongo: {}
};
var moscaSettings = {
port: 3000,
backend: ascoltatore,
persistence: {
factory: mosca.persistence.Mongo,
url: 'mongodb://localhost:27017/mqtt'
}
};
var server = new mosca.Server(moscaSettings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment