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}`); });