v4.0.1: launch v4

This commit is contained in:
AJ ONeal 2020-01-09 04:29:18 -07:00
parent 8e29cafdf5
commit 2d5125821e
3 changed files with 30 additions and 50 deletions

View File

@ -29,7 +29,7 @@ npm install --save greenlock-express@v4
``` ```
```bash ```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'
``` ```
<details> <details>
@ -38,44 +38,21 @@ npx greenlock init --maintainer-email 'jon@example.com' --config-dir ./greenlock
```js ```js
"use strict"; "use strict";
var app = require("./app.js");
require("greenlock-express") require("greenlock-express")
.init({ .init({
packageRoot: __dirname, packageRoot: __dirname,
// contact for security and critical bug notices
configDir: "./greenlock.d",
// whether or not to run at cloudscale // whether or not to run at cloudscale
cluster: false cluster: false
}) })
.ready(function(glx) { // Serves on 80 and 443
var app = require("./app.js"); // Get's SSL certificates magically!
.serve(app);
// Serves on 80 and 443
// Get's SSL certificates magically!
glx.serveApp(app);
});
```
</details>
<details>
<summary>greenlock.js</summary>
```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"
});
``` ```
</details> </details>
@ -86,6 +63,8 @@ module.exports = require("@root/greenlock").create({
```js ```js
"use strict"; "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) { var app = function(req, res) {
res.end("Hello, Encrypted World!"); res.end("Hello, Encrypted World!");
}; };
@ -100,7 +79,9 @@ npx greenlock add --subject example.com --altnames example.com
``` ```
<details> <details>
<summary>greenlock.json</summary> <summary>greenlock.d/config.json</summary>
<!-- TODO update manager to write array rather than object -->
```json ```json
{ "sites": [{ "subject": "example.com", "altnames": ["example.com"] }] } { "sites": [{ "subject": "example.com", "altnames": ["example.com"] }] }

29
package-lock.json generated
View File

@ -1,15 +1,15 @@
{ {
"name": "@root/greenlock-express", "name": "@root/greenlock-express",
"version": "3.1.1", "version": "4.0.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@greenlock/manager": { "@greenlock/manager": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/@greenlock/manager/-/manager-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@greenlock/manager/-/manager-3.1.0.tgz",
"integrity": "sha512-ijgJrFdzJPmzrDk8aKXYoYR8LNfG3hXd9/s54ZY7IgxTulyPQ/qOPgl7sWgCxxLhZBzSY1xI6eC/6Y5TQ01agg==", "integrity": "sha512-PBy5CMK+j4oD7sj7hF5qE+xKEOSiiuL2hHd5X5ttEbtnTSDKjNeqbrR5k2ZddwVNdjOVeBIeuqlm81IFZ+Ftew==",
"requires": { "requires": {
"greenlock-manager-fs": "^3.0.5" "greenlock-manager-fs": "^3.1.0"
} }
}, },
"@root/acme": { "@root/acme": {
@ -48,20 +48,19 @@
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ==" "integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
}, },
"@root/greenlock": { "@root/greenlock": {
"version": "3.1.3", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-3.1.3.tgz", "resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-4.0.2.tgz",
"integrity": "sha512-9Rj9JIKYItOvZKbPa5JrljS74dw+KjltOyQnb14y4nX89C+s1mZjv3Qiv1cNuYkYCmBGR77z0/cKnfUUaWxkag==", "integrity": "sha512-vurGBFlullzHM3STzQq00jWGCwvCYhpzusZZU69/80o4GPHB9OnUuxe/JlcokRZcCq+HqiVUeUJIBzPG086VWA==",
"requires": { "requires": {
"@greenlock/manager": "^3.0.0", "@greenlock/manager": "^3.1.0",
"@root/acme": "^3.0.8", "@root/acme": "^3.0.8",
"@root/csr": "^0.8.1", "@root/csr": "^0.8.1",
"@root/keypairs": "^0.9.0", "@root/keypairs": "^0.9.0",
"@root/mkdirp": "^1.0.0", "@root/mkdirp": "^1.0.0",
"@root/request": "^1.3.10", "@root/request": "^1.4.2",
"acme-http-01-standalone": "^3.0.5", "acme-http-01-standalone": "^3.0.5",
"cert-info": "^1.5.1", "cert-info": "^1.5.1",
"greenlock-manager-fs": "^3.0.5", "greenlock-store-fs": "^3.2.2",
"greenlock-store-fs": "^3.2.0",
"safe-replace": "^1.1.0" "safe-replace": "^1.1.0"
} }
}, },
@ -115,9 +114,9 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
}, },
"greenlock-manager-fs": { "greenlock-manager-fs": {
"version": "3.0.5", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.0.5.tgz", "resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.1.1.tgz",
"integrity": "sha512-r/q+tEFuDwklfzPfiGhcIrHuJxMrppC+EseESpu5f0DMokh+1iZVm9nGC/VE7/7GETdOYfEYhhQkmspsi8Gr/A==", "integrity": "sha512-np6qdnPIOZx40PAcSQcqK1eMPWjTKxsxcgRd/OVg0ai49WC1Ds74CTrwmB84pq2n53ikbnDBQFmKEQ4AC0DK8w==",
"requires": { "requires": {
"@root/mkdirp": "^1.0.0", "@root/mkdirp": "^1.0.0",
"safe-replace": "^1.1.0" "safe-replace": "^1.1.0"

View File

@ -1,6 +1,6 @@
{ {
"name": "@root/greenlock-express", "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.", "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", "main": "greenlock-express.js",
"homepage": "https://greenlock.domains", "homepage": "https://greenlock.domains",
@ -17,7 +17,7 @@
"example": "examples" "example": "examples"
}, },
"dependencies": { "dependencies": {
"@root/greenlock": "^3.1.3", "@root/greenlock": "^4.0.2",
"redirect-https": "^1.1.5" "redirect-https": "^1.1.5"
}, },
"trulyOptionalDependencies": { "trulyOptionalDependencies": {