Blog2012 ≫ nodejs express layout issue (how should I turn the layout off?)

Just had a funny on my new project where if I turn the layout off like this for a particular route (some javascript):

app.set( 'view options', { layout: false } );

then the layout was being turned off everywhere on my production box (though fine locally, and on my staging box, which is another identical ec2 instance). Changing to this format:

res.render( 'myview.ejs', { layout: true } );

fixes it... but why??? And why on one box and not its twin?

js: Programming language of the internets, mostly how I make my living.

⬅️ :: ➡️

Paul Clarke's weblog - I live in A small town. Married to Clare + dad to 2, I'm a full-stack web developr, + I do js / Node, some ruby, python, php etc. I like pubbing, parkrun, restaurants, home-automation + other diy jiggery-pokery, history, genealogy, TV, squirrels, pirates, lego, and TIME TRAVEL.