Add Slack support
This commit is contained in:
parent
18021e0ef8
commit
24c9363f0c
5 changed files with 72 additions and 10 deletions
3
app.js
3
app.js
|
@ -16,6 +16,7 @@ import index from './routes/index';
|
|||
import recent from './routes/recent';
|
||||
import search from './routes/search';
|
||||
import share from './routes/share';
|
||||
import slack from './routes/slack';
|
||||
import errorHandler from './lib/error-handler';
|
||||
|
||||
const debug = debuglog('combine.fm');
|
||||
|
@ -57,6 +58,8 @@ app.use(route.get('/recent', recent));
|
|||
app.use(route.post('/search', search));
|
||||
app.use(route.get('/:service/:type/:id.:format?', share));
|
||||
|
||||
app.use(route.post('/slack', slack));
|
||||
|
||||
if (!module.parent) {
|
||||
app.listen(process.env.PORT || 3000, () => {
|
||||
debug(`Koa HTTP server listening on port ${(process.env.PORT || 3000)}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue