Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Move livereload, image, and favicon to config
Browse files Browse the repository at this point in the history
  • Loading branch information
codydaig committed Jul 24, 2015
1 parent 29d264d commit a62c4dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion config/env/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ module.exports = {
port: process.env.PORT || 3000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
sessionCollection: 'sessions'
sessionCollection: 'sessions',
logo: 'modules/core/img/brand/logo.png',
favicon: 'modules/core/img/brand/favicon.ico'
};
3 changes: 2 additions & 1 deletion config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ module.exports = {
pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD'
}
}
}
},
livereload: true
};
3 changes: 3 additions & 0 deletions config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ module.exports.initLocalVariables = function (app) {
app.locals.facebookAppId = config.facebook.clientID;
app.locals.jsFiles = config.files.client.js;
app.locals.cssFiles = config.files.client.css;
app.locals.livereload = config.livereload;
app.locals.logo = config.logo;
app.locals.favicon = config.favicon;

// Passing the request url to environment locals
app.use(function (req, res, next) {
Expand Down
6 changes: 3 additions & 3 deletions modules/core/server/views/layout.server.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<meta property="og:title" content="{{title}}">
<meta property="og:description" content="{{description}}">
<meta property="og:url" content="{{url}}">
<meta property="og:image" content="{{url}}modules/core/img/brand/logo.png">
<meta property="og:image" content="{{url}}{{logo}}">
<meta property="og:type" content="website">

<!-- Twitter META -->
Expand All @@ -36,7 +36,7 @@
<meta name="twitter:image" content="{{url}}modules/core/img/brand/logo.png">

<!-- Fav Icon -->
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="{{url}}{{favicon}}" rel="shortcut icon" type="image/x-icon">

<!--Application CSS Files-->
{% for cssFile in cssFiles %}<link rel="stylesheet" href="{{cssFile}}">{% endfor %}
Expand Down Expand Up @@ -66,7 +66,7 @@
<!--Application JavaScript Files-->
{% for jsFile in jsFiles %}<script type="text/javascript" src="{{jsFile}}"></script>{% endfor %}

{% if process.env.NODE_ENV === 'development' %}
{% if livereload %}
<!--Livereload script rendered -->
<script type="text/javascript" src="{{host}}:35729/livereload.js"></script>
{% endif %}
Expand Down

0 comments on commit a62c4dd

Please sign in to comment.