Skip to content

Instantly share code, notes, and snippets.

Last active July 6, 2017 14:56
What would you like to do?
const restify = require('restify');
const builder = require('botbuilder');
const os = require('os');
const server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s',, server.url);
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});'/api/messages', connector.listen());
const bot = new builder.UniversalBot(connector, function (session) {
session.send("You said: %s, machine that responds is %s", session.message.text, os.hostname);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment