This commit is contained in:
Mr Swift
2024-04-27 21:12:54 +03:30
parent d0cd15922a
commit 3ae3f44ee9
2 changed files with 4 additions and 1 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
const express = require("express");
const errorHandler = require("./middleware/errorHandler");
const videovalidate = require("./middleware/vidoeValidate");
const db = require("./config/dbConnectoin");
const fileUpload = require("express-fileupload");
const path = require("path");
@@ -29,7 +30,9 @@ app.use(autoFetch(express, pAddress = "hasPermission", cAddress = "Admin", mAddr
app.use('/uploads', expressSharp({
imageAdapter: new FsAdapter(path.join(__dirname, 'uploads')),
}));
app.use('/vid', videovalidate.run, expressSharp({
imageAdapter: new FsAdapter(path.join(__dirname, 'Data')),
}));
//Error handler
app.use(errorHandler.run);