diff --git a/.gitignore b/.gitignore index c52b0c2..fb181dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -blomzt\config.php \ No newline at end of file +blomzt\config.php +node_modules \ No newline at end of file diff --git a/dodsorfas/Skypebot/app.js b/dodsorfas/Skypebot/app.js new file mode 100644 index 0000000..9430ed1 --- /dev/null +++ b/dodsorfas/Skypebot/app.js @@ -0,0 +1,24 @@ +var restify = require('restify'); +var builder = require('botbuilder'); + +// Bot setup + +// restify setup +var 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 bot +var connector = new builder.ChatConnector({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); +var bot = new builder.UniversalBot(connector); +server.post('/api/messages', connector.listen()); + +// Bot Dialogs + +bot.dialog('/', function(session) { + session.send("Hello World"); +}); \ No newline at end of file diff --git a/dodsorfas/Skypebot/package.json b/dodsorfas/Skypebot/package.json new file mode 100644 index 0000000..3a0b2cf --- /dev/null +++ b/dodsorfas/Skypebot/package.json @@ -0,0 +1,15 @@ +{ + "name": "skypebot", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "", + "dependencies": { + "botbuilder": "^3.2.3", + "restify": "^4.1.1" + } +}