Some parts of every website are shared throughout all pages. Learn how layouts and partials help modularize this and reduce redundancy.
- [Narrator] By now, we have an error template and some…placeholder for the Index template.…Now it's time to convert the Index page from the provided…HTML interpart and render it as a template.…For that, let's first copy the context of the Index…HTML file.…So, I go into "provided" and there I look for "Index HTML"…and I will copy it.…And as we did it with the error template, I will simply copy…it into the HTML to change converter,…and I will copy all of that.…
And, back in our project, I open "server,"…"Fuse,"…"Index" the part in there.…I will simply paste it in.…Now let's try that out and reload the Index page.…And this looks great already, so this would be a ledgered…HTML page.…Let's look at the source code.…As you see, change also properly formats that for us.…Let's make a quick check, and run it in Production Mode.…
So, I set mode.…And equals Production.…And I run Imprint Start.…Back to the page, let's look into the source code again.…Now it's unfermented without white spaces and indents.…That's great for computers, but maybe not so good…
- Creating a server with Express and pure Node.js
- Handling errors in Express
- Creating routes
- Using templates
- Working with the Pug template engine
- Implementing the site structure and logic
- Working with conditionals
- Dealing with POST requests
- Sanitizing user inputs and handling form errors
Skill Level Beginner
Building RESTful Web APIs with Node.js and Expresswith Emmanuel Henri1h 40m Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
What you should know1m 40s
1. Getting Started
2. Express Basics
3. Getting Started with Our Project
4. Getting Started with Templates
5. Implementing the Site Structure and Logic
6. Handling Form Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.