diff --git a/README.md b/README.md
index 06ee13c..65c2d1d 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ npm install --save greenlock-express@v4
```
```bash
-npx greenlock init --maintainer-email 'jon@example.com' --config-dir ./greenlock.d
+npx greenlock init --config-dir ./greenlock.d --maintainer-email 'jon@example.com'
```
@@ -38,44 +38,21 @@ npx greenlock init --maintainer-email 'jon@example.com' --config-dir ./greenlock
```js
"use strict";
+var app = require("./app.js");
+
require("greenlock-express")
.init({
packageRoot: __dirname,
+ // contact for security and critical bug notices
+ configDir: "./greenlock.d",
+
// whether or not to run at cloudscale
cluster: false
})
- .ready(function(glx) {
- var app = require("./app.js");
-
- // Serves on 80 and 443
- // Get's SSL certificates magically!
- glx.serveApp(app);
- });
-```
-
-
-
-
-greenlock.js
-
-```js
-"use strict";
-
-var pkg = require("./package.json");
-module.exports = require("@root/greenlock").create({
- // name & version for ACME client user agent
- //packageAgent: pkg.name + "/" + pkg.version,
-
- // contact for security and critical bug notices
- maintainerEmail: pkg.author,
-
- // where to find .greenlockrc and set default paths
- packageRoot: __dirname,
-
- // where config and certificate stuff go
- configDir: "./greenlock.d"
-});
+ // Serves on 80 and 443
+ // Get's SSL certificates magically!
+ .serve(app);
```
@@ -86,6 +63,8 @@ module.exports = require("@root/greenlock").create({
```js
"use strict";
+// Here's a vanilla HTTP app to start,
+// but feel free to replace it with Express, Koa, etc
var app = function(req, res) {
res.end("Hello, Encrypted World!");
};
@@ -100,7 +79,9 @@ npx greenlock add --subject example.com --altnames example.com
```
-greenlock.json
+greenlock.d/config.json
+
+
```json
{ "sites": [{ "subject": "example.com", "altnames": ["example.com"] }] }
diff --git a/package-lock.json b/package-lock.json
index 0d3970f..72336c2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,15 +1,15 @@
{
"name": "@root/greenlock-express",
- "version": "3.1.1",
+ "version": "4.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@greenlock/manager": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@greenlock/manager/-/manager-3.0.0.tgz",
- "integrity": "sha512-ijgJrFdzJPmzrDk8aKXYoYR8LNfG3hXd9/s54ZY7IgxTulyPQ/qOPgl7sWgCxxLhZBzSY1xI6eC/6Y5TQ01agg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@greenlock/manager/-/manager-3.1.0.tgz",
+ "integrity": "sha512-PBy5CMK+j4oD7sj7hF5qE+xKEOSiiuL2hHd5X5ttEbtnTSDKjNeqbrR5k2ZddwVNdjOVeBIeuqlm81IFZ+Ftew==",
"requires": {
- "greenlock-manager-fs": "^3.0.5"
+ "greenlock-manager-fs": "^3.1.0"
}
},
"@root/acme": {
@@ -48,20 +48,19 @@
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
},
"@root/greenlock": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-3.1.3.tgz",
- "integrity": "sha512-9Rj9JIKYItOvZKbPa5JrljS74dw+KjltOyQnb14y4nX89C+s1mZjv3Qiv1cNuYkYCmBGR77z0/cKnfUUaWxkag==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-4.0.2.tgz",
+ "integrity": "sha512-vurGBFlullzHM3STzQq00jWGCwvCYhpzusZZU69/80o4GPHB9OnUuxe/JlcokRZcCq+HqiVUeUJIBzPG086VWA==",
"requires": {
- "@greenlock/manager": "^3.0.0",
+ "@greenlock/manager": "^3.1.0",
"@root/acme": "^3.0.8",
"@root/csr": "^0.8.1",
"@root/keypairs": "^0.9.0",
"@root/mkdirp": "^1.0.0",
- "@root/request": "^1.3.10",
+ "@root/request": "^1.4.2",
"acme-http-01-standalone": "^3.0.5",
"cert-info": "^1.5.1",
- "greenlock-manager-fs": "^3.0.5",
- "greenlock-store-fs": "^3.2.0",
+ "greenlock-store-fs": "^3.2.2",
"safe-replace": "^1.1.0"
}
},
@@ -115,9 +114,9 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"greenlock-manager-fs": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.0.5.tgz",
- "integrity": "sha512-r/q+tEFuDwklfzPfiGhcIrHuJxMrppC+EseESpu5f0DMokh+1iZVm9nGC/VE7/7GETdOYfEYhhQkmspsi8Gr/A==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.1.1.tgz",
+ "integrity": "sha512-np6qdnPIOZx40PAcSQcqK1eMPWjTKxsxcgRd/OVg0ai49WC1Ds74CTrwmB84pq2n53ikbnDBQFmKEQ4AC0DK8w==",
"requires": {
"@root/mkdirp": "^1.0.0",
"safe-replace": "^1.1.0"
diff --git a/package.json b/package.json
index 25c0e5f..90a5dfd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@root/greenlock-express",
- "version": "4.0.0",
+ "version": "4.0.1",
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
"main": "greenlock-express.js",
"homepage": "https://greenlock.domains",
@@ -17,7 +17,7 @@
"example": "examples"
},
"dependencies": {
- "@root/greenlock": "^3.1.3",
+ "@root/greenlock": "^4.0.2",
"redirect-https": "^1.1.5"
},
"trulyOptionalDependencies": {