Last active
September 8, 2017 22:53
-
-
Save nwhitmont/78d0830b8b6c358475ae93cd4b8a711b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In your messages/index.js, wrap the returned function from connector.listen() with console.log override, shown below: | |
if (useEmulator) { | |
var restify = require('restify'); | |
var server = restify.createServer(); | |
server.listen(3978, function() { | |
console.log('test bot endpont at http://localhost:3978/api/messages'); | |
}); | |
server.post('/api/messages', connector.listen()); | |
} else { | |
var listener = connector.listen(); | |
var withLogging = function(context, req) { | |
console.log = context.log; | |
listener(context, req); | |
} | |
module.exports = { default: withLogging } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment