Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
maccman committed Oct 31, 2011
2 parents a0eac33 + 909efba commit 453b65d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion client.js
Expand Up @@ -3339,5 +3339,9 @@ Juggernaut.Message.prototype.toJSON = function(){
return(JSON.stringify(object));
};

if (typeof module != "undefined")
if (typeof module != "undefined") {
module.exports = Juggernaut;
} else {
window.Juggernaut = Juggernaut;
}
;
7 changes: 5 additions & 2 deletions client/vendor/assets/javascripts/juggernaut.js
Expand Up @@ -135,5 +135,8 @@ Juggernaut.Message.prototype.toJSON = function(){
return(JSON.stringify(object));
};

if (typeof module != "undefined")
module.exports = Juggernaut;
if (typeof module != "undefined") {
module.exports = Juggernaut;
} else {
window.Juggernaut = Juggernaut;
}
7 changes: 4 additions & 3 deletions lib/juggernaut/server.js
Expand Up @@ -8,9 +8,10 @@ var nstatic = require("node-static-maccman");
var Connection = require("./connection");

var credentials;
if (path.existsSync("keys/privatekey.pem")) {
var privateKey = fs.readFileSync("keys/privatekey.pem", "utf8");
var certificate = fs.readFileSync("keys/certificate.pem", "utf8");
var keysPath = __dirname + "/keys";
if (path.existsSync(keysPath + "/privatekey.pem") && path.existsSync(keysPath + "/certificate.pem")) {
var privateKey = fs.readFileSync(keysPath + "/privatekey.pem", "utf8");
var certificate = fs.readFileSync(keysPath + "/certificate.pem", "utf8");
credentials = {key: privateKey, cert: certificate};
}

Expand Down
2 changes: 1 addition & 1 deletion public/application.js

Large diffs are not rendered by default.

0 comments on commit 453b65d

Please sign in to comment.