diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-09-26 23:03:22 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-09-26 23:03:22 +0200 |
commit | 1b119448248ea17df4fd87475b4d2263b077a4c3 (patch) | |
tree | c3d6335f1b39b7b45ddc6f2dbc2a0cb6485267a6 | |
parent | 59ad79c467a7591dd31b121de023a8ada8b4d2f9 (diff) |
Add slack command
-rw-r--r-- | src/server/app.js | 2 | ||||
-rw-r--r-- | src/server/routes/slack.js | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/server/app.js b/src/server/app.js index 36d7e26..3477ed5 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -8,6 +8,7 @@ const compression = require('compression') const routes = require('./routes/index') const getSchedule = require('./routes/getSchedule') const manifest = require('./routes/manifest') +const slack = require('./routes/slack') const app = express() @@ -27,6 +28,7 @@ app.use(express.static(path.join(__dirname, '../client/static'))) app.use('/', routes) app.use('/get', getSchedule) +app.use('/slack', slack) // catch 404 and forward to error handler app.use(function (req, res, next) { diff --git a/src/server/routes/slack.js b/src/server/routes/slack.js new file mode 100644 index 0000000..0fa6218 --- /dev/null +++ b/src/server/routes/slack.js @@ -0,0 +1,11 @@ +const express = require('express') +const router = express.Router() +const request = require('request') +const iconv = require('iconv-lite') + +router.get('/', function (req, res, next) { + console.log(req); + res.end('Will be implemented soon™!'); +}) + +module.exports = router |