#{variableName}
li #{video.rating}/5
mixing variable with attributes(href, class, id...)
`${variableName}
` (inside backticks)
Ex)
a(href=`/videos/${video.id}`)=video.title
POST is a http method that is used to manipulate the data and/or send data to back-end.
videoRouter.get("/:id(\\d+)/edit", getEdit);
videoRouter.post("/:id(\\d+)/edit", postEdit);
You can shorten this two get and post router into ->
videoRouter.route("/:id(\\d+)/edit").get(getEdit).post(postEdit);
app.use(express.urlencoded({ extended: true })); // understands and transform the value in the form into javascript object
req.body is a javascript representation of the value in the form