Created API-Skeleton and some structure.

This commit is contained in:
2025-10-29 11:38:32 +01:00
parent 2edc0c9b29
commit a43895d918
4 changed files with 911 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
const express = require('express');
const router = express.Router();
router.get("/", async(req, res) => {
try {
res.send("Videos");
res.status(200).send("Videos send.");
} catch (e) {
res.status(500).send("Error trying to get the video files.")
}
});
router.post("/", async(req, res) =>{
try{
res.send("videos send");
res.status(201).send("Video file uploaded.");
}
catch(e){
res.status(500).send("Error trying to upload video file.");
}
});
router.get("/{id}", async(req, res) => {
try {
res.send("Video with id");
res.status(200).send("Video details acquired.");
} catch (e) {
}
});
module.exports = router;