+ 2

Is it a good practice to create a blog with Server side node js where you can upload your HTML files?

Consider that you have a code like that app.get('/posts:idpost',function(req,res){ //datas coming from database var post = [{title: "How to center a div", slog:"Learn how to center a div" file"how-to-center-a-div.html" }] res.sendfile('/blog/'+post.file); }); //so in posts maker uploading using multer app.post('/post',upload.single('myFile'), function(req, res) { console.log(req.file); console.log(req.file.path); // some code //save paths and titles on database })

30th Oct 2022, 12:13 AM
Félix Zamdamela
Félix  Zamdamela - avatar
1 Resposta
+ 1
You can use databases to access
3rd Nov 2022, 6:59 PM
Malai Raja D
Malai Raja D - avatar