One of the best features of express is how easy it is to work with routing. Routing allows you to give users access to different types of data as well as pass information through the params variable of the request object.
- [Voiceover] So far, we've been able to work…with routes to add content to our site,…but a site is much more than just HTML.…We need to be able to access other types…of files like images or scripts.…Now, Express provides a piece of middleware…that takes care of this called static.…Middleware is any library that can be called…as part of the process of working with a site…that then returns control back to Express.…So the one that we need to use is called express.static,…and it allows you to designate a folder…for holding any sort of document or file…that we want our users or our routes to have access to.…
In this course, Ray Villalobos walks through the process of creating full-featured websites with these technologies. First, find out how to install each package and leverage Node.js features from within Express. Then learn how to build a basic application with templating engines like EJS; create more flexible, modular code with includes and conditional statements; build APIs to manage HTTP requests to add and delete content dynamically; and configure more complex routing. Along the way, Ray implements features like customer feedback forms and real-time live chat, so you can see exactly what Node.js and Express are capable of.
- Handling HTTP requests with Node.js and Express
- Creating and modularizing routes
- Using templates
- Building flexible views
- Creating an API route
- Dealing with POST and DELETE requests
- Creating live chat features with Socket.IO