It's time to handle our feedback form. In order to do that we need to work with a different type of HTTP verb called POST. Post is a very common http verb that lets you send information through a request. Post allows you to modify data within your applications, but data needs to be formatted in special ways, so the body-parser library makes this easier. If we want to save the data, the built in fs module makes it easy.
- [Voiceover] So it's time to take care of our…feedback forum.…And in order to do that we need to work with a…different type of HTTP verb called POST.…Now this is something new, and a bit different,…so let's review what we have to do right here.…Servers work by handling different types of requests,…and so far we've been handling only one type called GET.…It lets us request information from the server.…There are other verbs like POST, DELETE, and UPDATE.…The one that we need for what we're doing now…is called POST.…
And it's designed to send data through the route.…Now, we're gonna do that by handling the submission…of the form with jQuery, and then we will use a…piece of middleware called body-parser.…POST data has to be encoded in special ways.…And we can use this piece of middleware to take care of…that for us.…Now finally, unless we want this data to be temporary,…we'll need to use one of the built in modules called fs,…or file system to save the file to our hard drive.…
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