git-alerts-bot/server.js

11 lines
338 B
JavaScript
Raw Normal View History

2018-11-25 18:44:07 +01:00
const express = require('express');
const app = express();
app.use(express.json());
const convert = require('./util/convert');
app.get('/webhook/:provider', (req) => {
const strategy = req.params.provider;
const eventType = convert.getEvent[strategy](req.body);
});
app.listen(2000, () => console.log('Listening on port 2000'));