Join Daniel Khan for an in-depth discussion in this video Adding dynamic data, part of Building a Website with Node.js and Express.js.
- [Instructor] So far we only set a few variables…but there is of course more to a dynamic website.…In most cases, much of the data shown will come…from third party systems, like a database…or from a so-called application programming interface,…in short, API.…Today these APIs are mostly HTTP endpoints…that return JSON.…We don't want to over complicate things…by adding a database.…Check out my course Databases for Node.js Developers…for that.…Instead, we will fetch the data from a JSON file…that is provided with this course.…
On the other hand we also should not simplify too much,…so we will create a service that will be very similar…to one you would use to access a database or API.…In fact, you could even swap the JSON with a database later.…So let's get started by bringing the provided JSON…into our application.…You find it in the provided folder…and there you have a folder data.…So I will copy that folder…and I will paste it right into the server directory.…
Let's have a look at it real quick.…So in there we have some JSON file…
- 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.