Permalink
Browse files

generate url for homepage

  • Loading branch information...
1 parent 2dd1272 commit f76e142f8038b95107c155096e3fdef4c7f62edd Ali Asaria committed Oct 11, 2011
Showing with 5 additions and 2 deletions.
  1. +4 −1 server.js
  2. +1 −1 views/home.jade
View
@@ -36,8 +36,11 @@ app.configure( function(){
});
app.get('/', function(req, res) {
+ console.log(req.header('host'));
+ url = req.header('host');
res.render('home.jade', {
- layout: false
+ layout: false,
+ locals: {url: url}
});
});
View
@@ -28,7 +28,7 @@ body
a#go(onclick="return go();")  go.
<br><br>
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>
p.home.small sourcecode at <a href="https://github.com/aliasaria/scrumblr">github</a>

0 comments on commit f76e142

Please sign in to comment.