18 lines
421 B
TypeScript
18 lines
421 B
TypeScript
|
import compression from "compression";
|
||
|
import express from "express";
|
||
|
import listEndpoints from "express-list-endpoints";
|
||
|
import ImageController from "./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;
|