In this video, explore the available built-in middleware, such as JSON, static, and urlencoded, with examples and an overview.
- [Narrator] Express has a few built-in middleware…we can use to do specific things.…In fact, we already used one of them in our code,…the express.static, which allows us to use…static files in our web server.…Let's explore two other methods…available to us with Express.…The next one is express.json,…which allows us to parse JSON POST commands.…So what does that mean?…It means that when a form or the front end…wants to send new data to our server and database,…and send it in JSON, we need our server to be able…to use it in this format and then post it to the database.…
That's what it does.…It's Express' own version of body-parser,…if you ever used it.…Let me quickly show you an example.…So the first thing I want to show you is the examples…of JSON data versus URL encoded, which we're…going to use both in this video.…So let me just quickly do a comment here,…so I'll go to index.js and feel free to…copy what I'm commenting here…so it gives you some documentation for yourself.…So, this is JSON data and you may have seen it…
- Creating a basic data endpoint
- Routing with Express
- Adding a static route for file serving
- Basic middleware with Express
- Built-in middleware and error-handling middleware
- Debugging in an Express application
- Security best practices with Express
Skill Level Beginner
1. Setting Up Express
2. Getting Started
3. Routing with Express
4. Middleware with Express
5. Advanced Topics in Express
- 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.