added debug functionality.
This commit is contained in:
parent
6490072a62
commit
499062de8c
6
index.js
6
index.js
|
@ -39,6 +39,12 @@ module.exports.create = (createOptions) => {
|
|||
|
||||
const options = Object.assign({}, defaultOptions, createOptions);
|
||||
|
||||
if (!options.debug) {
|
||||
console = console || {};
|
||||
console.log = () => { };
|
||||
console.error = () => { };
|
||||
}
|
||||
|
||||
AWS.config.update({
|
||||
region: options.bucketRegion
|
||||
, credentials: new AWS.Credentials({
|
||||
|
|
3
test.js
3
test.js
|
@ -16,11 +16,12 @@ let store = require('./index').create({
|
|||
, bucketName: bucketName
|
||||
, configDir: 'acme/'
|
||||
, accountsDir: 'accounts/'
|
||||
, debug: true
|
||||
});
|
||||
|
||||
// All of these tests can pass locally, standalone without any ACME integration.
|
||||
tester.test(store).then(() => {
|
||||
console.info("Test successfully completed");
|
||||
console.info("Test completed successfully.");
|
||||
}).catch((err) => {
|
||||
console.error(err.message);
|
||||
throw err;
|
||||
|
|
Loading…
Reference in New Issue