2024-04-15 08:54:01 +00:00
|
|
|
import compression from "compression";
|
|
|
|
import express from "express";
|
|
|
|
import listEndpoints from "express-list-endpoints";
|
2024-04-17 17:23:39 +00:00
|
|
|
import ImageController from "src/controllers/ImageController";
|
2024-04-15 08:54:01 +00:00
|
|
|
|
|
|
|
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;
|