paypro: example - allow user to set options when using example as a module.

This commit is contained in:
Christopher Jeffrey 2014-08-18 14:25:50 -07:00
parent bf77041f1d
commit da36abcc1e
1 changed files with 8 additions and 4 deletions

View File

@ -36,10 +36,6 @@ var TransactionBuilder = bitcore.TransactionBuilder;
* Variables
*/
var isNode = !argv.b && !argv.browser;
var app = express();
var x509 = {
priv: fs.readFileSync(__dirname + '/../../test/data/x509.key'),
pub: fs.readFileSync(__dirname + '/../../test/data/x509.pub'),
@ -52,6 +48,14 @@ var server = https.createServer({
cert: fs.readFileSync(__dirname + '/../../test/data/x509.crt')
});
server.setOptions = function(options) {
argv = options;
};
var isNode = !argv.b && !argv.browser;
var app = express();
/**
* Ignore Cache Headers
* Allow CORS