Last active
December 10, 2015 15:09
-
-
Save jaydp17/f500d1a0da7ed108a42c to your computer and use it in GitHub Desktop.
A simple server using mosca
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
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