From 9d8da8331d0cffaaba2c73b75df2a9c79754ab92 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 15 Dec 2015 13:28:52 +0000 Subject: [PATCH] use backend directly --- examples/ursa.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/ursa.js b/examples/ursa.js index d86562c..4a9feaf 100644 --- a/examples/ursa.js +++ b/examples/ursa.js @@ -12,20 +12,22 @@ config.le.server = LE.stagingServer; // Manual Registration // var le = LE.create(require('../backends/ursa'), config.le); -le.register({ +le.backend.registerAsync({ agreeTos: true -, domains: ['example.com'] // CHANGE TO YOUR DOMAIN -, email: 'user@email.com' // CHANGE TO YOUR EMAIL -}, function (err) { +, domains: ['example.com'] // CHANGE TO YOUR DOMAIN +, email: 'user@example.com' // CHANGE TO YOUR EMAIL +}, function (err, body) { if (err) { console.error('[Error]: node-letsencrypt/examples/ursa'); console.error(err.stack); } else { - console.log('success'); + console.log('success', body); } plainServer.close(); tlsServer.close(); +}).then(function () {}, function (err) { + console.error(err.stack); }); //