Last active
March 12, 2017 22:09
-
-
Save lucasscariot/b2600b49f97f10623478662af86b02cc to your computer and use it in GitHub Desktop.
Slack Command Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
let app = express() | |
app.use(cors()) | |
app.use(bodyParser.json()) | |
app.use(bodyParser.urlencoded({ extended: true })) | |
app.post('/', (req, res) => { | |
console.log(req.body); | |
res.json({ | |
'text': `Want to eat ${req.body.text} ?`, | |
"attachments": [{ | |
"text": "Yummy !" | |
}] | |
}) | |
}) | |
app.listen(3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment