generate url for homepage

This commit is contained in:
Ali Asaria 2011-10-10 21:38:47 -04:00
parent 2dd1272958
commit f76e142f80
2 changed files with 5 additions and 2 deletions

View file

@ -36,8 +36,11 @@ app.configure( function(){
}); });
app.get('/', function(req, res) { app.get('/', function(req, res) {
console.log(req.header('host'));
url = req.header('host');
res.render('home.jade', { res.render('home.jade', {
layout: false layout: false,
locals: {url: url}
}); });
}); });

View file

@ -28,7 +28,7 @@ body
a#go(onclick="return go();")  go. a#go(onclick="return go();")  go.
<br><br> <br><br>
p.home example board: p.home example board:
p.home <a href="http://scrumblr.ca/demo">http://scrumblr.ca/demo</a> p.home!= '<a href="http://' + locals.url + '/demo">' + locals.url + '/demo</a>'
<br><br><br> <br><br><br>
p.home.small sourcecode at <a href="https://github.com/aliasaria/scrumblr">github</a> p.home.small sourcecode at <a href="https://github.com/aliasaria/scrumblr">github</a>