From c3731c68f5cf0b30e172ca3797dc10985f8b7075 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Mon, 3 Feb 2014 09:52:54 -0500 Subject: [PATCH] Add app.locals.pretty = true to Pro Tips --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2be7a2571..e376035330 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,8 @@ asynchronous tasks, and then render a page, but only when all tasks are complete want to scrape 3 different websites for some data (async operation) and render the results on a page after all 3 websites have been scraped. - Need to find a specific object inside an Array? Use [_.findWhere](http://underscorejs.org/#findWhere) function from Underscore.js. For example, this is how you would retrieve a Twitter token from database: `var token = _.findWhere(req.user.tokens, { kind: 'twitter' });`, where `req.user.tokens` is an Array, and a second parameter is an object with a given key/value. - +- If you right click and select **View Page Source**, notice how Express minified HTML for you. If you +would like to see original, non-minified markup, add `app.locals.pretty = true;` to Express configuration. FAQ ---