Configure production to run in https

This commit is contained in:
terakilobyte
2015-06-16 14:30:16 -04:00
parent 72770b5fbe
commit 0a8356e50f
4 changed files with 73 additions and 37 deletions

16
server/ssl-config.js Normal file
View File

@@ -0,0 +1,16 @@
/**
* Created by nathanleniz on 6/16/15.
*/
var path = require('path');
var fs = require('fs');
if (process.env.NODE_ENV === 'production') {
exports.privateKey =
fs.readFileSync(path.join(__dirname,
'../../private/privatekey.pem')).toString();
exports.certificate =
fs.readFileSync(path.join(__dirname,
'../../private/certificate.pem')).toString();
}