Skip to content

Instantly share code, notes, and snippets.

@alessioalex
Created October 29, 2011 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alessioalex/1324312 to your computer and use it in GitHub Desktop.
Save alessioalex/1324312 to your computer and use it in GitHub Desktop.
bubersson3 - express route
app.get('/lect1.html', function (req, res) {
var a_local_variable;
// you do some stuff here
if (some_condition) {
a_local_variable = value;
}
res.render('lect1', {
// this has a dynamic value
'my_var': a_local_variable
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment