+ 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 })
1 ответ
+ 1
You can use databases to access