-
Notifications
You must be signed in to change notification settings - Fork 1
/
server.js
37 lines (24 loc) · 817 Bytes
/
server.js
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
29
30
31
32
33
34
35
36
37
'use strict'
const express = require('express')
const Slapp = require('slapp')
const BeepBoopConvoStore = require('slapp-convo-beepboop')
const BeepBoopContext = require('slapp-context-beepboop')
console.log('SLACK_VERIFY_TOKEN::' + process.env.SLACK_VERIFY_TOKEN)
//if (!process.env.PORT) throw Error('PORT missing but required')
var slapp = Slapp({
record: 'out.jsonl',
convo_store: BeepBoopConvoStore(),
context: BeepBoopContext()
})
require('beepboop-slapp-presence-polyfill')(slapp, { debug: true })
require('./commands')(slapp)
//slapp.client.users.list()
var app = slapp.attachToExpress(express())
app.get('/', function (req, res) {
res.send('Hello')
})
app.post("/", function(req,res) {
console.log(req)
});
console.log('Listening on :' + process.env.PORT)
app.listen(process.env.PORT)