generate url for homepage
This commit is contained in:
parent
2dd1272958
commit
f76e142f80
2 changed files with 5 additions and 2 deletions
|
@ -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}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue