Auto generate ssl cert and download spritesheet on npm install

This commit is contained in:
Danielv123 committed 2018-01-14 21:50:47 +01:00
1 parent 071a2e6dbe
commit a307cd63a3
2 files changed
+39 -4

No files matched your search

+2 -3
View File
@@ -7,13 +7,12 @@ var pki = forge.pki;
var rsa = forge.pki.rsa;
var startTime, endTime;
var doLogging = true;
if(!doLogging) console.log = function(){};
module.exports = function({
bits = 2048,
certificatePath = "database/certificate",
doLogging = false,
} = {}){
if(!doLogging) console.log = function(){};
console.log("Generating SSL certificate with "+bits+" bits at "+certificatePath);
startTime = Date.now();