September 2014
Intermediate to advanced
316 pages
7h 6m
English
HTTP is request based. The browser makes a request and our web server responds with a response. This interaction is hidden from users in all browsers, for a good reason. When developing applications, we will have the need to view this interaction. For this we will use Chrome's Network tab.
This will be our first new application, so create a directory named requests. This directory will be the root of our project. The first thing we will do is use a basic Express server. This code is right from Express' API documentation. It is the most basic functioning 'hello world' we can build. Create an app.js file and add the following code to it:
var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('hello ...