git-alerts-bot/server.js

11 lines
338 B
JavaScript
Raw Normal View History

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