Skip to content

Instantly share code, notes, and snippets.

@eblancoh
Last active October 23, 2018 07:25
Show Gist options
  • Save eblancoh/069698530f3e4c1c9898a8d1dd97cda1 to your computer and use it in GitHub Desktop.
Save eblancoh/069698530f3e4c1c9898a8d1dd97cda1 to your computer and use it in GitHub Desktop.
const path = require('path');
const https = require('https');
const restify = require('restify');
const builder = require('botbuilder');
const locationDialog = require('botbuilder-location');
const moment = require('moment-timezone');
const qs = require("querystring");
const BING_MAPS_KEY = 'BING_MAPS_KEY';
const inMemoryStorage = new builder.MemoryBotStorage();
var statusLabel = "";
// Setup Restify Server
const server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat connector for communicating with the Bot Framework Service
const connector = new builder.ChatConnector({
appId: process.env.MicrosoftAppId,
appPassword: process.env.MicrosoftAppPassword
});
// Listen for messages from users
server.post('/api/messages', connector.listen());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment