webhook / server.ts
julien-c's picture
julien-c HF staff
All scaffolding
2e22a88 verified
raw
history blame
355 Bytes
import * as express from "express";
const expressApp = express();
expressApp.get("/", (req, res) => {
res.json({ hello: "world" });
});
expressApp.post("/", (req, res) => {
console.log(req.body);
res.json({ success: true });
});
const PORT = 7860;
expressApp.listen(PORT, () => {
console.debug(`server started at http://localhost:${PORT}`);
});