var restify = require('restify');
var config = require('./config');
var server = restify.createServer();
var onMessage;

server.listen(config.port, function () {
   console.log('%s listening to %s', server.name, server.url); 
});

server.post('/api/messages', function(){
    if (onMessage) {
        onMessasge.apply(this, arguments);
    }
});

module.exports = {
    onMessage: function(cb) {
        onMessage = cb;
    }
};

@@ -301,17 +301,16 @@
  onMessa
-s
 ge.apply
@@ -339,16 +339,133 @@
  %7D%0A%7D);%0A%0A
+server.on('uncaughtException', function (req, res, err, cb) %7B%0A    console.log(arguments);%0A    console.log(err);%0A%7D);%0A%0A
 module.e

fix syntax issue