Skip to content

Commit

Permalink
add ssl redirect for heroku with NODE_ENV variable set to production
Browse files Browse the repository at this point in the history
also added the variable to heroku
  • Loading branch information
thatkookooguy committed Oct 6, 2017
1 parent a800ea5 commit 38facce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -3,6 +3,7 @@ var path = require('path');
global.appRoot = path.resolve(__dirname);
global.io = {};
var scribe = require('scribe-js')();
var sslRedirect = require('heroku-ssl-redirect');
var express = require('express'); // call express
var config = require('./config');
var compression = require('compression');
Expand All @@ -20,6 +21,9 @@ var console = require('./app/models/consoleService')();

var app = express(); // define our app using express

// enable ssl redirect
app.use(sslRedirect());

//Nunjucks setup
nunjucks.configure('views', {
autoescape: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -30,6 +30,7 @@
"gulp": "^3.9.1",
"gulp-util": "^3.0.7",
"helmet": "^3.1.0",
"heroku-ssl-redirect": "0.0.4",
"http-auth": "^3.1.1",
"js-schema": "^1.0.1",
"lodash": "^4.16.6",
Expand Down

0 comments on commit 38facce

Please sign in to comment.