Created
October 29, 2011 10:22
-
-
Save alessioalex/1324312 to your computer and use it in GitHub Desktop.
bubersson3 - express route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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