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 multer from "multer";
import path from "path";
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, "uploads/blog");
},
filename: function (req, file, cb) {
const fileName = Date.now() + path.extname(file.originalname);
cb(null, fileName);
},
});
export const upload = multer({storage});