greenlock-challenge-manual.js/test.js

21 lines
460 B
JavaScript
Raw Permalink Normal View History

2016-08-10 03:20:19 +00:00
'use strict';
var challenge = require('./').create({});
var opts = challenge.getOptions();
var domain = 'example.com';
var token = 'token-id';
var key = 'secret-key';
// this will cause the prompt to appear
challenge.set(opts, domain, token, key, function (err) {
// if there's an error, there's a problem
if (err) {
throw err;
}
// this will cause the final completion message to appear
challenge.remove(opts, domain, token, function () {
});
});