_t1nrg
Last Updated: February 25, 2016
·
1.142K
· third
430983 2960405523913 1383033175 n

Pretty HTML source code in Express

Sometimes you wanted to see a snapshot of the generated HTML code of your app prior to any DOM manipulation (i.e. view source). I have been using app.locals.pretty = true; for a while but I did not know this when I first used node and express so I wanted to share for new comers. It is recommended to only call this on development due to performance reason.

app.configure('development', function(){  
  app.locals.pretty = true;
});
Say Thanks
Respond

1 Response
Add your response

9243
Icflorescu

Good to know, thanks for sharing!

over 1 year ago ·