Slide 2
Slide 2 text
1 var app = require('express')();
2
3 app.get('/search', function(req, res, next) {
4 doSearch(req.params, function(err, result) {
5 if (err) return next(err);
6
7 // trying to access non-existing property
8 if (result.foo.bar) {
9 console.log('does not work');
10 }
11 });
12 });
13
14 app.listen(8080);
Freitag, 29. Juni 12