-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
28 lines (22 loc) · 747 Bytes
/
server.js
File metadata and controls
28 lines (22 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
let util = require('util');
let http = require('http');
let Bot = require('@kikinteractive/kik');
// Configure the bot API endpoint, details for your bot
let bot = new Bot({
username: 'shaisbot',
apiKey: '274f113b-2abd-44ec-9193-d49181a36a55',
baseUrl: 'https://beepboophq.com/proxy/56fc42b2ce9746f09b241e0c471914ec/incoming'
});
bot.updateBotConfiguration();
bot.onTextMessage((message) => {
console.log("Got message: " + message.body);
message.reply(message.body);
});
function handleRequest(request, response){
response.end('It Works!! Path Hit: ' + request.url);
}
// Set up your server and start listening
let server = http
.createServer(bot.incoming())
.listen(process.env.PORT || 8080);