Cover by David Herron

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Using Express to implement the Math Wizard

Now that we understand Connect, let's take the Math Wizard on its next evolutionary step with Express. Express is a web application framework built upon Connect (a middleware framework). This means that the focus of Express is on constructing an application, including providing a template system, where the focus of Connect is on web server infrastructure. The same team develops both Express and Connect so it shouldn't be surprising to learn the APIs are extremely similar.

For example, this is Hello World in Express:

var app = require('express').createServer();
app.get('/', function(req, res) {
  res.send('Hello, world!');
});
app.listen(3000);

This should look similar to the code for Connect we went over in ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required