mcollina / ponte

The M2M/IoT Bridge for REST developers
51 stars 5 forks source link

Question: Config file example #2

Closed douglagm closed 10 years ago

douglagm commented 10 years ago

Hi, I don't seem to be able to add a "Question" label. My only interaction with js and or node.js ever has been through this brilliant piece of software. Do you have an example for configuring MongoDB for persistent storage ?

I see you have a link to the Mosca page, I don't understand the syntax, is it supposed to look something like this(Taken from you ascoltatori project): MongoPersistence( var settings = { url: 'mongodb://127.0.0.1/ascoltatori', pubsubCollection: 'ascoltatori', mongo: {} // mongo specific options }; )

mcollina commented 10 years ago

This is javascript and it's the standard node.js way for interacting with software: you run your own customized version of Ponte.

I think a basic introduction to node is necessary: I suggest you to do http://nodeschool.io/#learn-you-node, which is a basic workshop that teaches you the basic of node.js. You can buy a book on node.js too (there are many good ones!).

As for the configuration, here we go: https://github.com/mcollina/ponte/blob/master/test/sample_config_mongodb.js