Handling GET requests returning JSON


show more Handling GET requests returning JSON provides you with in-depth training on Developer. Taught by Joseph LeBlanc as part of the Node.js Essential Training (2013) show less
please wait ...

Handling GET requests returning JSON

Express is designed to make it easy to define and handle HTTP routes. In this video, we'll define several routes and use the module from the previous chapter to handle them. First, let's go to the exercise files. Go to video two, and then copy the start folder onto the desktop. Now I'm going to change directory to this folder. I'm going to type cd space, and then I'm going to drag this folder into terminal. Since I'm pulling these from the exercise files, I need to install the node modules, and to do that, I'm going to type npm, space, install.

So now the node modules are installed. Now let's start building out this application. In the exercise files and video two, there's a folder named flight. This is the module that we developed earlier in the course. I'm going to copy this folder and paste it into start. Now let's edit the code. Open the folder in Sublime Text or any other text editor. First, let's go to routes, and index dot js. The first thing we want...

Handling GET requests returning JSON
Video duration: 3m 26s 3h 17m Intermediate

Viewers:

Handling GET requests returning JSON provides you with in-depth training on Developer. Taught by Joseph LeBlanc as part of the Node.js Essential Training (2013)

Subject:
Developer
Software:
JavaScript Node.js
Author:
please wait ...