app.js.udp 440 B

1234567891011121314151617181920212223
  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', function(){
  9. app.set('connectorConfig',
  10. {
  11. connector : pomelo.connectors.udpconnector,
  12. heartbeat : 3
  13. });
  14. });
  15. // start app
  16. app.start();
  17. process.on('uncaughtException', function (err) {
  18. console.error(' Caught exception: ' + err.stack);
  19. });