fe-middleware/index.ts

18 lines
404 B
TypeScript
Raw Normal View History

2024-03-28 08:29:33 +00:00
import compression from "compression";
import express from "express";
import listEndpoints from "express-list-endpoints";
const app = express();
const port = 3000;
app.use(express.json());
app.use(compression());
app.get("/", (_, res) => {
const endpoints = listEndpoints(app);
res.json({ endpoints });
});
app.listen(port, () =>
console.log(`Express server listening on port ${port}`)
);