Finish Backend - Node.js/Express/MongoDB Course #6
Mô tả
In this video we will be finishing the backed of the project by setting up the book's Show/Edit/Update/Delete routes. To do this we will need to: 1. Add routes to the book's controller 2. Add views for the book's views 3. Interact with our database to update and delete books 4. Finish the navigation for books in our views 5. Polish our backend code and views Code For This Video:
Danh sách bài giảng (1 bài)
Bài 1: Finish Backend - Node.js/Express/MongoDB Course #6
Video bài giảngBài kiểm tra Quizzes (1)
Chưa mở khóaKiểm tra giữa kỳ: Finish Backend - Node.js/Express/MongoDB Course #6
Bài kiểm tra tổng hợp 5 câu hỏi trắc nghiệm giúp củng cố kiến thức trọng tâm trong khóa học Finish Backend - Node.js/Express/MongoDB Course #6.
Bài kiểm tra đang bị khóa
Vui lòng đăng ký mua khóa học để mở khóa toàn bộ 1 bài kiểm tra trắc nghiệm và xem kết quả làm bài.
Đánh giá từ học viên
Nhận xét và trải nghiệm thực tế từ các học viên đã đăng ký tham gia khóa học này.
Dựa trên 10 lượt đánh giá từ học viên
Đăng nhập để đánh giá khóa học
Bạn cần đăng nhập và tham gia khóa học để có thể gửi đánh giá và nhận xét.
Tất cả đánh giá 10
Dude, even though this is old, this is still a very valuable course for me. Thank you for putting the effort into making it. I haven't done web dev for approximately 15 years and so much has changed - for the better. Things are far easier now. Thanks again!
Thank you! 14:34 On the stroke number 96 you need to write res.redirect('/') instead of redirect('/')
I have reach this video by following your full stack course. So far so good. Thank you so much Mr Kyle.
@WebDevSimplified - At 4:40, you resize the book image: My question: in fileUpload.js, we had set up the FilePond plugins to resize the image for us with this code:
FilePond.setOptions({
stylePanelAspectRatio: 1.5 / 1,
imageResizeTargetWidth: 100,
imageResizeTargetHeight: 150
})
I verified on the FilePond docs that the dimension values (100 and 150 above) are indeed pixels and don't require that we add units. So why wasn't it resizing the images when we added them to the book? Why is it necessary to do in the /books/show.ejs page?
First of all thank you for such great details, I have everything working except for the fact that I can't get the Author name field to populate when rendering the show page for Books. It doesn't give me an error but when I console.log(book.author.name) it comes as undefined. I have really busted my head to figure this out, on the branches route I have tried appending the const book = await Book.findById(req.params.id).populate('author').exec(); with execPopulate() but that didn't work as well. I tried changing the name of the collection and a couple of different options but still, I can't get the Author name field to be populated. Any Idea what may be going wrong?