O'Reilly logo

Building Scalable Apps with Redis and Node.js by Joshua Johanan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inspecting requests

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required