feat: basic api setup and boilerplate

This commit is contained in:
ARJUN S THAMPI
2026-03-12 14:15:44 +05:30
commit 521a1fea79
24 changed files with 684 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import express from "express";
import {upload} from "../controllers/upload.controller.js";
const router = express.Router();
router.post("/image", upload.single("image"), (req, res) => {
res.json({
success: 1,
file: {
url: `http://localhost:3000/uploads/blog/${req.file.filename}`,
},
});
});
export default router;