fe-middleware/src/app.ts

18 lines
423 B
TypeScript
Raw Normal View History

import compression from "compression";
import express from "express";
import listEndpoints from "express-list-endpoints";
import ImageController from "src/controllers/ImageController";
const app = express();
app.use(express.json());
app.use(compression());
app.get("/", (_, res) => {
const endpoints = listEndpoints(app);
res.json({ endpoints });
});
app.get("/image", ImageController.get);
export default app;