app.js 505 B

12345678910111213141516171819202122232425
  1. var pomelo = require('pomelo');
  2. /**
  3. * Init app for client.
  4. */
  5. var app = pomelo.createApp();
  6. app.set('name', '$');
  7. // app configuration
  8. app.configure('production|development', 'connector', function(){
  9. app.set('connectorConfig',
  10. {
  11. connector : pomelo.connectors.hybridconnector,
  12. heartbeat : 3,
  13. useDict : true,
  14. useProtobuf : true
  15. });
  16. });
  17. // start app
  18. app.start();
  19. process.on('uncaughtException', function (err) {
  20. console.error(' Caught exception: ' + err.stack);
  21. });