const express = require("express");
const path = require("path");

const app = express();
const imagesFolder = "D:\\IMG_EPI";

app.get("/api/images/:imageName", (req, res) => {
  try {
    const imageName = req.params.imageName;
    const imagePath = path.join(imagesFolder, imageName);
    res.sendFile(imagePath);
  } catch {}
});

app.listen(3000, () => {
  console.log("API server running on port 3000");
});
