Skip to content

Commit

Permalink
changing build params for cloud deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jrossi227 committed Mar 10, 2017
1 parent 197ba95 commit 17c981a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions app.js
Expand Up @@ -49,8 +49,7 @@ app.use(function (req, res) {
res.render('index',{
content:iso.render(),
pageTitle: config.pageTitle,
metaDescription: metaDescription,
port: config.port
metaDescription: metaDescription
});
});
});
Expand Down
6 changes: 1 addition & 5 deletions config.js
@@ -1,16 +1,12 @@
var port = process.env.PORT || 9080;
var host = "localhost";
var protocol = "http:";

if (typeof window !== 'undefined') {
host = window.location.hostname;
protocol = window.location.protocol;
port = window.location.port;
}

var config = {
port: port,
baseUrl : protocol + "//" + host + (port != "" ? (":" + port) : ""),
baseUrl : typeof window !== 'undefined' ? window.location.origin : "http://localhost:" + port,
pageTitle: 'React Blog',
itemsPerPage: 5,
maxPageButtons: 3
Expand Down
3 changes: 1 addition & 2 deletions views/index.jade
Expand Up @@ -15,5 +15,4 @@ html(class='no-js',lang='en')
script(src='/scripts/includes.js')
script.
NProgress.configure({ minimum : 0.4 });
script.
window.port = !{port};

0 comments on commit 17c981a

Please sign in to comment.