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;
});
Written by Third Santor
Related protips
1 Response
Good to know, thanks for sharing!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Express
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#