Compare commits
No commits in common. "master" and "v3" have entirely different histories.
147
README.md
147
README.md
@ -19,18 +19,8 @@ Free SSL, Automated HTTPS / HTTP2, served with Node via Express, Koa, hapi, etc.
|
|||||||
Greenlock Express is a **Web Server** with **Fully Automated HTTPS** and renewals.
|
Greenlock Express is a **Web Server** with **Fully Automated HTTPS** and renewals.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function httpsWorker(glx) {
|
|
||||||
// Serves on 80 and 443
|
|
||||||
// Get's SSL certificates magically!
|
|
||||||
|
|
||||||
glx.serveApp(function(req, res) {
|
|
||||||
res.end("Hello, Encrypted World!");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var pkg = require("./package.json");
|
var pkg = require("./package.json");
|
||||||
|
|
||||||
require("greenlock-express")
|
require("greenlock-express")
|
||||||
.init(function getConfig() {
|
.init(function getConfig() {
|
||||||
// Greenlock Config
|
// Greenlock Config
|
||||||
@ -44,6 +34,37 @@ require("greenlock-express")
|
|||||||
.serve(httpsWorker);
|
.serve(httpsWorker);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
With **Express**:
|
||||||
|
|
||||||
|
```js
|
||||||
|
function httpsWorker(glx) {
|
||||||
|
// Works with any Node app (Express, etc)
|
||||||
|
var app = require("./my-express-app.js");
|
||||||
|
|
||||||
|
// See, all normal stuff here
|
||||||
|
app.get("/hello", function(req, res) {
|
||||||
|
res.end("Hello, Encrypted World!");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Serves on 80 and 443
|
||||||
|
// Get's SSL certificates magically!
|
||||||
|
glx.serveApp(app);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Or with **plain** node HTTP:
|
||||||
|
|
||||||
|
```js
|
||||||
|
function httpsWorker(glx) {
|
||||||
|
// Serves on 80 and 443
|
||||||
|
// Get's SSL certificates magically!
|
||||||
|
|
||||||
|
glx.serveApp(function(req, res) {
|
||||||
|
res.end("Hello, Encrypted World!");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Manage via API or the config file:
|
Manage via API or the config file:
|
||||||
|
|
||||||
`~/.config/greenlock/manage.json`: (default filesystem config)
|
`~/.config/greenlock/manage.json`: (default filesystem config)
|
||||||
@ -89,13 +110,39 @@ Manage via API or the config file:
|
|||||||
- [x] Key and Certificate Management
|
- [x] Key and Certificate Management
|
||||||
- [x] ACME Challenge Plugins
|
- [x] ACME Challenge Plugins
|
||||||
|
|
||||||
|
# Plenty of Examples
|
||||||
|
|
||||||
|
**These are in-progress** Check back tomorrow (Nov 2nd, 2019).
|
||||||
|
|
||||||
|
- [greenlock-express.js/examples/](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples)
|
||||||
|
- [Express](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/express/)
|
||||||
|
- [Node's **http2**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http2/)
|
||||||
|
- [Node's https](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/https/)
|
||||||
|
- [**WebSockets**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/websockets/)
|
||||||
|
- [Socket.IO](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/socket-io/)
|
||||||
|
- [Cluster](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/cluster/)
|
||||||
|
- [**Wildcards**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/wildcards/) (coming soon)
|
||||||
|
- [**Localhost**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/localhost/) (coming soon)
|
||||||
|
- [**CI/CD**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/ci-cd/) (coming soon)
|
||||||
|
- [HTTP Proxy](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http-proxy/)
|
||||||
|
|
||||||
|
# Easy to Customize
|
||||||
|
|
||||||
|
<!-- greenlock-manager-test => greenlock-manager-custom -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
- [greenlock.js/examples/](https://git.rootprojects.org/root/greenlock.js/src/branch/master/examples)
|
||||||
|
-->
|
||||||
|
|
||||||
|
- [Custom Domain Management](https://git.rootprojects.org/root/greenlock-manager-test.js)
|
||||||
|
- [Custom Key & Cert Storage](https://git.rootprojects.org/root/greenlock-store-test.js)
|
||||||
|
- [Custom ACME HTTP-01 Challenges](https://git.rootprojects.org/root/acme-http-01-test.js)
|
||||||
|
- [Custom ACME DNS-01 Challenges](https://git.rootprojects.org/root/acme-dns-01-test.js)
|
||||||
|
|
||||||
# QuickStart Guide
|
# QuickStart Guide
|
||||||
|
|
||||||
Easy as 1, 2, 3... 4
|
Easy as 1, 2, 3... 4
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>1. Create a node project</summary>
|
|
||||||
|
|
||||||
## 1. Create a node project
|
## 1. Create a node project
|
||||||
|
|
||||||
Create an empty node project.
|
Create an empty node project.
|
||||||
@ -108,14 +155,9 @@ pushd ~/my-project
|
|||||||
npm init
|
npm init
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>2. Create an http app (i.e. express)</summary>
|
|
||||||
|
|
||||||
## 2. Create an http app (i.e. express)
|
## 2. Create an http app (i.e. express)
|
||||||
|
|
||||||
This example is shown with Express, but any node app will do. Greenlock
|
This example is shown with Express, but any node app will doGreenlock
|
||||||
works with everything.
|
works with everything.
|
||||||
(or any node-style http app)
|
(or any node-style http app)
|
||||||
|
|
||||||
@ -143,11 +185,6 @@ app.get("/", myPlainNodeHttpApp);
|
|||||||
module.exports = app;
|
module.exports = app;
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>3. Serve with Greenlock Express</summary>
|
|
||||||
|
|
||||||
## 3. Serve with Greenlock Express
|
## 3. Serve with Greenlock Express
|
||||||
|
|
||||||
Greenlock Express is designed with these goals in mind:
|
Greenlock Express is designed with these goals in mind:
|
||||||
@ -203,11 +240,6 @@ Listening on 0.0.0.0:80 for ACME challenges and HTTPS redirects
|
|||||||
Listening on 0.0.0.0:443 for secure traffic
|
Listening on 0.0.0.0:443 for secure traffic
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>4. Manage SSL Certificates and Domains</summary>
|
|
||||||
|
|
||||||
## 4. Manage domains
|
## 4. Manage domains
|
||||||
|
|
||||||
The management API is built to work with Databases, S3, etc.
|
The management API is built to work with Databases, S3, etc.
|
||||||
@ -274,61 +306,6 @@ Note: **Localhost**, **Wildcard**, and Certificates for Private Networks require
|
|||||||
- [**Localhost**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/localhost/) (coming soon)
|
- [**Localhost**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/localhost/) (coming soon)
|
||||||
- [**CI/CD**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/ci-cd/) (coming soon)
|
- [**CI/CD**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/ci-cd/) (coming soon)
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
# Plenty of Examples
|
|
||||||
|
|
||||||
**These are in-progress** Check back tomorrow (Nov 2nd, 2019).
|
|
||||||
|
|
||||||
- [greenlock-express.js/examples/](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples)
|
|
||||||
- [Express](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/express/)
|
|
||||||
- [Node's **http2**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http2/)
|
|
||||||
- [Node's https](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/https/)
|
|
||||||
- [**WebSockets**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/websockets/)
|
|
||||||
- [Socket.IO](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/socket-io/)
|
|
||||||
- [Cluster](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/cluster/)
|
|
||||||
- [**Wildcards**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/wildcards/) (coming soon)
|
|
||||||
- [**Localhost**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/localhost/) (coming soon)
|
|
||||||
- [**CI/CD**](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/ci-cd/) (coming soon)
|
|
||||||
- [HTTP Proxy](https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http-proxy/)
|
|
||||||
|
|
||||||
# Easy to Customize
|
|
||||||
|
|
||||||
<!-- greenlock-manager-test => greenlock-manager-custom -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- [greenlock.js/examples/](https://git.rootprojects.org/root/greenlock.js/src/branch/master/examples)
|
|
||||||
-->
|
|
||||||
|
|
||||||
- [Custom Domain Management](https://git.rootprojects.org/root/greenlock-manager-test.js)
|
|
||||||
- [Custom Key & Cert Storage](https://git.rootprojects.org/root/greenlock-store-test.js)
|
|
||||||
- [Custom ACME HTTP-01 Challenges](https://git.rootprojects.org/root/acme-http-01-test.js)
|
|
||||||
- [Custom ACME DNS-01 Challenges](https://git.rootprojects.org/root/acme-dns-01-test.js)
|
|
||||||
|
|
||||||
# Ready-made Integrations
|
|
||||||
|
|
||||||
Greenlock Express integrates between Let's Encrypt's ACME Challenges and many popular services.
|
|
||||||
|
|
||||||
| Type | Service | Plugin |
|
|
||||||
| ----------- | ----------------------------------------------------------------------------------- | ------------------------ |
|
|
||||||
| dns-01 | CloudFlare | acme-dns-01-cloudflare |
|
|
||||||
| dns-01 | [Digital Ocean](https://git.rootprojects.org/root/acme-dns-01-digitalocean.js) | acme-dns-01-digitalocean |
|
|
||||||
| dns-01 | [DNSimple](https://git.rootprojects.org/root/acme-dns-01-dnsimple.js) | acme-dns-01-dnsimple |
|
|
||||||
| dns-01 | [DuckDNS](https://git.rootprojects.org/root/acme-dns-01-duckdns.js) | acme-dns-01-duckdns |
|
|
||||||
| http-01 | File System / [Web Root](https://git.rootprojects.org/root/acme-http-01-webroot.js) | acme-http-01-webroot |
|
|
||||||
| dns-01 | [GoDaddy](https://git.rootprojects.org/root/acme-dns-01-godaddy.js) | acme-dns-01-godaddy |
|
|
||||||
| dns-01 | [Gandi](https://git.rootprojects.org/root/acme-dns-01-gandi.js) | acme-dns-01-gandi |
|
|
||||||
| dns-01 | [NameCheap](https://git.rootprojects.org/root/acme-dns-01-namecheap.js) | acme-dns-01-namecheap |
|
|
||||||
| dns-01 | [Name.com](https://git.rootprojects.org/root/acme-dns-01-namedotcom.js) | acme-dns-01-namedotcom |
|
|
||||||
| dns-01 | Route53 (AWS) | acme-dns-01-route53 |
|
|
||||||
| http-01 | S3 (AWS, Digital Ocean, Scaleway) | acme-http-01-s3 |
|
|
||||||
| dns-01 | [Vultr](https://git.rootprojects.org/root/acme-dns-01-vultr.js) | acme-dns-01-vultr |
|
|
||||||
| dns-01 | [Build your own](https://git.rootprojects.org/root/acme-dns-01-test.js) | acme-dns-01-test |
|
|
||||||
| http-01 | [Build your own](https://git.rootprojects.org/root/acme-http-01-test.js) | acme-http-01-test |
|
|
||||||
| tls-alpn-01 | [Contact us](mailto:support@therootcompany.com) | - |
|
|
||||||
|
|
||||||
Search `acme-http-01-` or `acme-dns-01-` on npm to find more.
|
|
||||||
|
|
||||||
# Full Documentation
|
# Full Documentation
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@root/greenlock-express",
|
"name": "@root/greenlock-express",
|
||||||
"version": "3.0.10",
|
"version": "3.0.9",
|
||||||
"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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user