123456789101112131415161718192021222324 |
- var pomelo = require('pomelo');
- /**
- * Init app for client.
- */
- var app = pomelo.createApp();
- app.set('name', '$');
- // app configuration
- app.configure('production|development', 'connector', function(){
- app.set('connectorConfig',
- {
- connector : pomelo.connectors.mqttconnector,
- publishRoute: 'connector.entryHandler.publish',
- subscribeRoute: 'connector.entryHandler.subscribe'
- });
- });
- // start app
- app.start();
- process.on('uncaughtException', function (err) {
- console.error(' Caught exception: ' + err.stack);
- });
|