diff --git a/config/env/all.js b/config/env/all.js index e8419d2121..392b81849f 100644 --- a/config/env/all.js +++ b/config/env/all.js @@ -5,7 +5,18 @@ var path = require('path'), module.exports = { root: rootPath, - port: process.env.PORT || 3000, + http: { + port: process.env.PORT || 3000 + }, + https: { + port: false, + + // Paths to key and cert as string + ssl: { + key: '', + cert: '' + } + }, hostname: process.env.HOST || process.env.HOSTNAME, db: process.env.MONGOHQ_URL, templateEngine: 'swig', diff --git a/server.js b/server.js index 54ac178c29..1da8b8c3e3 100755 --- a/server.js +++ b/server.js @@ -5,5 +5,8 @@ var mean = require('meanio'); // Creates and serves mean application mean.serve({ /*options placeholder*/ }, function(app, config) { - console.log('Mean app started on port ' + config.port + ' (' + process.env.NODE_ENV + ')'); + console.log('Mean app started on port ' + config.http.port + ' (' + process.env.NODE_ENV + ')'); + if(config.https && config.https.port){ + console.log('Mean secure app started on port ' + config.https.port + ' (' + process.env.NODE_ENV + ')'); + } });