AJ ONeal
5 years ago
34 changed files with 1839 additions and 1415 deletions
@ -1,7 +1,7 @@ |
|||
{ |
|||
"bracketSpacing": true, |
|||
"printWidth": 120, |
|||
"tabWidth": 2, |
|||
"tabWidth": 4, |
|||
"trailingComma": "none", |
|||
"useTabs": true |
|||
"useTabs": false |
|||
} |
|||
|
@ -1,35 +1,35 @@ |
|||
"use strict"; |
|||
|
|||
require("./") |
|||
.init(initialize) |
|||
.serve(worker) |
|||
.master(function() { |
|||
console.log("Hello from master"); |
|||
}); |
|||
.init(initialize) |
|||
.serve(worker) |
|||
.master(function() { |
|||
console.log("Hello from master"); |
|||
}); |
|||
|
|||
function initialize() { |
|||
var pkg = require("./package.json"); |
|||
var config = { |
|||
package: { |
|||
name: "Greenlock_Express_Demo", |
|||
version: pkg.version, |
|||
author: pkg.author |
|||
}, |
|||
staging: true, |
|||
cluster: true, |
|||
var pkg = require("./package.json"); |
|||
var config = { |
|||
package: { |
|||
name: "Greenlock_Express_Demo", |
|||
version: pkg.version, |
|||
author: pkg.author |
|||
}, |
|||
staging: true, |
|||
cluster: true, |
|||
|
|||
notify: function(ev, params) { |
|||
console.info(ev, params); |
|||
} |
|||
}; |
|||
return config; |
|||
notify: function(ev, params) { |
|||
console.info(ev, params); |
|||
} |
|||
}; |
|||
return config; |
|||
} |
|||
|
|||
function worker(glx) { |
|||
console.info(); |
|||
console.info("Hello from worker #" + glx.id()); |
|||
console.info(); |
|||
console.info("Hello from worker #" + glx.id()); |
|||
|
|||
glx.serveApp(function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}); |
|||
glx.serveApp(function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}); |
|||
} |
|||
|
@ -1,27 +1,27 @@ |
|||
"use strict"; |
|||
|
|||
function httpsWorker(glx) { |
|||
var app = require("./my-express-app.js"); |
|||
var app = require("./my-express-app.js"); |
|||
|
|||
app.get("/hello", function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}); |
|||
app.get("/hello", function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}); |
|||
|
|||
// Serves on 80 and 443
|
|||
// Get's SSL certificates magically!
|
|||
glx.serveApp(app); |
|||
// Serves on 80 and 443
|
|||
// Get's SSL certificates magically!
|
|||
glx.serveApp(app); |
|||
} |
|||
|
|||
var pkg = require("../../package.json"); |
|||
//require("greenlock-express")
|
|||
require("../../") |
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
|
|||
return { |
|||
package: { name: "http2-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
return { |
|||
package: { name: "http2-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
|
@ -1,44 +1,44 @@ |
|||
"use strict"; |
|||
|
|||
function httpsWorker(glx) { |
|||
// we need the raw https server
|
|||
var server = glx.httpsServer(); |
|||
var proxy = require("http-proxy").createProxyServer({ xfwd: true }); |
|||
// we need the raw https server
|
|||
var server = glx.httpsServer(); |
|||
var proxy = require("http-proxy").createProxyServer({ xfwd: true }); |
|||
|
|||
// catches error events during proxying
|
|||
proxy.on("error", function(err, req, res) { |
|||
console.error(err); |
|||
res.statusCode = 500; |
|||
res.end(); |
|||
return; |
|||
}); |
|||
// catches error events during proxying
|
|||
proxy.on("error", function(err, req, res) { |
|||
console.error(err); |
|||
res.statusCode = 500; |
|||
res.end(); |
|||
return; |
|||
}); |
|||
|
|||
// We'll proxy websockets too
|
|||
server.on("upgrade", function(req, socket, head) { |
|||
proxy.ws(req, socket, head, { |
|||
ws: true, |
|||
target: "ws://localhost:3000" |
|||
}); |
|||
}); |
|||
// We'll proxy websockets too
|
|||
server.on("upgrade", function(req, socket, head) { |
|||
proxy.ws(req, socket, head, { |
|||
ws: true, |
|||
target: "ws://localhost:3000" |
|||
}); |
|||
}); |
|||
|
|||
// servers a node app that proxies requests to a localhost
|
|||
glx.serveApp(function(req, res) { |
|||
proxy.web(req, res, { |
|||
target: "http://localhost:3000" |
|||
}); |
|||
}); |
|||
// servers a node app that proxies requests to a localhost
|
|||
glx.serveApp(function(req, res) { |
|||
proxy.web(req, res, { |
|||
target: "http://localhost:3000" |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
var pkg = require("../../package.json"); |
|||
//require("greenlock-express")
|
|||
require("../../") |
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
|
|||
return { |
|||
package: { name: "http-proxy-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
return { |
|||
package: { name: "http-proxy-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
|
@ -0,0 +1,75 @@ |
|||
"use strict"; |
|||
|
|||
// npm install spdy@3.x
|
|||
|
|||
//var Greenlock = require('greenlock-express')
|
|||
var Greenlock = require("../"); |
|||
|
|||
var greenlock = Greenlock.create({ |
|||
// Let's Encrypt v2 is ACME draft 11
|
|||
version: "draft-11", |
|||
|
|||
server: "https://acme-v02.api.letsencrypt.org/directory", |
|||
// Note: If at first you don't succeed, stop and switch to staging
|
|||
// https://acme-staging-v02.api.letsencrypt.org/directory
|
|||
|
|||
// You MUST change this to a valid email address
|
|||
email: "jon@example.com", |
|||
|
|||
// You MUST NOT build clients that accept the ToS without asking the user
|
|||
agreeTos: true, |
|||
|
|||
// You MUST change these to valid domains
|
|||
// NOTE: all domains will validated and listed on the certificate
|
|||
approvedDomains: ["example.com", "www.example.com"], |
|||
|
|||
// You MUST have access to write to directory where certs are saved
|
|||
// ex: /home/foouser/acme/etc
|
|||
configDir: "~/.config/acme/", |
|||
|
|||
// Get notified of important updates and help me make greenlock better
|
|||
communityMember: true |
|||
|
|||
//, debug: true
|
|||
}); |
|||
|
|||
////////////////////////
|
|||
// http-01 Challenges //
|
|||
////////////////////////
|
|||
|
|||
// http-01 challenge happens over http/1.1, not http2
|
|||
var redirectHttps = require("redirect-https")(); |
|||
var acmeChallengeHandler = greenlock.middleware(function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.end( |
|||
"<h1>Hello, ⚠️ Insecure World!</h1><a>Visit Secure Site</a>" + |
|||
'<script>document.querySelector("a").href=window.location.href.replace(/^http/i, "https");</script>' |
|||
); |
|||
}); |
|||
require("http") |
|||
.createServer(acmeChallengeHandler) |
|||
.listen(80, function() { |
|||
console.log("Listening for ACME http-01 challenges on", this.address()); |
|||
}); |
|||
|
|||
////////////////////////
|
|||
// http2 via SPDY h2 //
|
|||
////////////////////////
|
|||
|
|||
// spdy is a drop-in replacement for the https API
|
|||
var spdyOptions = Object.assign({}, greenlock.tlsOptions); |
|||
spdyOptions.spdy = { protocols: ["h2", "http/1.1"], plain: false }; |
|||
var server = require("spdy").createServer( |
|||
spdyOptions, |
|||
require("express")().use("/", function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.end("<h1>Hello, 🔐 Secure World!</h1>"); |
|||
}) |
|||
); |
|||
server.on("error", function(err) { |
|||
console.error(err); |
|||
}); |
|||
server.on("listening", function() { |
|||
console.log("Listening for SPDY/http2/https requests on", this.address()); |
|||
}); |
|||
server.listen(443); |
@ -0,0 +1,30 @@ |
|||
"use strict"; |
|||
|
|||
//require('greenlock-express')
|
|||
require("../") |
|||
.create({ |
|||
// Let's Encrypt v2 is ACME draft 11
|
|||
version: "draft-11", |
|||
|
|||
server: "https://acme-v02.api.letsencrypt.org/directory", |
|||
// Note: If at first you don't succeed, stop and switch to staging
|
|||
// https://acme-staging-v02.api.letsencrypt.org/directory
|
|||
|
|||
email: "john.doe@example.com", |
|||
|
|||
agreeTos: true, |
|||
|
|||
approvedDomains: ["example.com", "www.example.com"], |
|||
|
|||
app: require("express")().use("/", function(req, res) { |
|||
res.end("Hello, World!"); |
|||
}), |
|||
|
|||
renewWithin: 91 * 24 * 60 * 60 * 1000, |
|||
renewBy: 90 * 24 * 60 * 60 * 1000, |
|||
|
|||
// Get notified of important updates and help me make greenlock better
|
|||
communityMember: true, |
|||
debug: true |
|||
}) |
|||
.listen(80, 443); |
@ -0,0 +1,104 @@ |
|||
"use strict"; |
|||
|
|||
//
|
|||
// WARNING: Not for noobs
|
|||
// Try the simple example first
|
|||
//
|
|||
|
|||
//
|
|||
// This demo is used with tunnel-server.js and tunnel-client.js
|
|||
//
|
|||
|
|||
var email = "john.doe@gmail.com"; |
|||
var domains = ["example.com"]; |
|||
var agreeLeTos = true; |
|||
//var secret = "My Little Brony";
|
|||
var secret = require("crypto") |
|||
.randomBytes(16) |
|||
.toString("hex"); |
|||
|
|||
require("../") |
|||
.create({ |
|||
version: "draft-11", |
|||
|
|||
server: "https://acme-v02.api.letsencrypt.org/directory", |
|||
// Note: If at first you don't succeed, stop and switch to staging
|
|||
// https://acme-staging-v02.api.letsencrypt.org/directory
|
|||
|
|||
email: email, |
|||
agreeTos: agreeLeTos, |
|||
approveDomains: domains, |
|||
configDir: "~/.config/acme/", |
|||
app: remoteAccess(secret), |
|||
// Get notified of important updates and help me make greenlock better
|
|||
communityMember: true |
|||
//, debug: true
|
|||
}) |
|||
.listen(3000, 8443); |
|||
|
|||
function remoteAccess(secret) { |
|||
var express = require("express"); |
|||
var basicAuth = require("express-basic-auth"); |
|||
var serveIndex = require("serve-index"); |
|||
|
|||
var rootIndex = serveIndex("/", { hidden: true, icons: true, view: "details" }); |
|||
var rootFs = express.static("/", { dotfiles: "allow", redirect: true, index: false }); |
|||
|
|||
var userIndex = serveIndex(require("os").homedir(), { hidden: true, icons: true, view: "details" }); |
|||
var userFs = express.static(require("os").homedir(), { dotfiles: "allow", redirect: true, index: false }); |
|||
|
|||
var app = express(); |
|||
var realm = "Login Required"; |
|||
|
|||
var myAuth = basicAuth({ |
|||
users: { root: secret, user: secret }, |
|||
challenge: true, |
|||
realm: realm, |
|||
unauthorizedResponse: function(/*req*/) { |
|||
return 'Unauthorized <a href="/">Home</a>'; |
|||
} |
|||
}); |
|||
|
|||
app.get("/", function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.end('<a href="/browse/">View Files</a>' + " | " + '<a href="/logout/">Logout</a>'); |
|||
}); |
|||
app.use("/logout", function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.setHeader("WWW-Authenticate", 'Basic realm="' + realm + '"'); |
|||
res.statusCode = 401; |
|||
//res.setHeader('Location', '/');
|
|||
res.end('Logged out | <a href="/">Home</a>'); |
|||
}); |
|||
app.use("/browse", myAuth); |
|||
app.use("/browse", function(req, res, next) { |
|||
if ("root" === req.auth.user) { |
|||
rootFs(req, res, function() { |
|||
rootIndex(req, res, next); |
|||
}); |
|||
return; |
|||
} |
|||
if ("user" === req.auth.user) { |
|||
userFs(req, res, function() { |
|||
userIndex(req, res, next); |
|||
}); |
|||
return; |
|||
} |
|||
res.end("Sad Panda"); |
|||
}); |
|||
|
|||
console.log(""); |
|||
console.log(""); |
|||
console.log("Usernames are\n"); |
|||
console.log("\troot"); |
|||
console.log("\tuser"); |
|||
console.log(""); |
|||
console.log("Password (for both) is\n"); |
|||
console.log("\t" + secret); |
|||
console.log(""); |
|||
console.log("Shhhh... It's a secret to everybody!"); |
|||
console.log(""); |
|||
console.log(""); |
|||
|
|||
return app; |
|||
} |
@ -0,0 +1,134 @@ |
|||
#!/usr/bin/env node
|
|||
"use strict"; |
|||
|
|||
///////////////////
|
|||
// vhost example //
|
|||
///////////////////
|
|||
|
|||
//
|
|||
// virtual hosting example
|
|||
//
|
|||
|
|||
// The prefix where sites go by name.
|
|||
// For example: whatever.com may live in /srv/www/whatever.com, thus /srv/www is our path
|
|||
var srv = process.argv[3] || "/srv/www/"; |
|||
|
|||
var path = require("path"); |
|||
var fs = require("fs").promises; |
|||
var finalhandler = require("finalhandler"); |
|||
var serveStatic = require("serve-static"); |
|||
|
|||
//var glx = require('greenlock-express')
|
|||
var glx = require("./").create({ |
|||
version: "draft-11", // Let's Encrypt v2 is ACME draft 11
|
|||
|
|||
server: "https://acme-v02.api.letsencrypt.org/directory", // If at first you don't succeed, stop and switch to staging
|
|||
// https://acme-staging-v02.api.letsencrypt.org/directory
|
|||
|
|||
configDir: process.argv[4] || "~/.config/acme/", // You MUST have access to write to directory where certs
|
|||
// are saved. ex: /home/foouser/.config/acme
|
|||
|
|||
approveDomains: myApproveDomains, // Greenlock's wraps around tls.SNICallback. Check the
|
|||
// domain name here and reject invalid ones
|
|||
|
|||
app: myVhostApp, // Any node-style http app (i.e. express, koa, hapi, rill)
|
|||
|
|||
/* CHANGE TO A VALID EMAIL */ |
|||
email: process.argv[2] || "jon.doe@example.com", // Email for Let's Encrypt account and Greenlock Security
|
|||
agreeTos: true // Accept Let's Encrypt ToS
|
|||
//, communityMember: true // Join Greenlock to get important updates, no spam
|
|||
|
|||
//, debug: true
|
|||
}); |
|||
|
|||
var server = glx.listen(80, 443); |
|||
server.on("listening", function() { |
|||
console.info(server.type + " listening on", server.address()); |
|||
}); |
|||
|
|||
function myApproveDomains(opts, certs, cb) { |
|||
console.log("sni:", opts.domain); |
|||
// In this example the filesystem is our "database".
|
|||
// We check in /srv/www for whatever.com and if it exists, it's allowed
|
|||
|
|||
// SECURITY Greenlock validates opts.domains ahead-of-time so you don't have to
|
|||
return checkWwws(opts.domains[0]) |
|||
.then(function() { |
|||
//opts.email = email;
|
|||
opts.agreeTos = true; |
|||
cb(null, { options: opts, certs: certs }); |
|||
}) |
|||
.catch(cb); |
|||
} |
|||
|
|||
function checkWwws(_hostname) { |
|||
if (!_hostname) { |
|||
// SECURITY, don't allow access to the 'srv' root
|
|||
// (greenlock-express uses middleware to check '..', etc)
|
|||
return ""; |
|||
} |
|||
var hostname = _hostname; |
|||
var _hostdir = path.join(srv, hostname); |
|||
var hostdir = _hostdir; |
|||
// TODO could test for www/no-www both in directory
|
|||
return fs |
|||
.readdir(hostdir) |
|||
.then(function() { |
|||
// TODO check for some sort of htaccess.json and use email in that
|
|||
// NOTE: you can also change other options such as `challengeType` and `challenge`
|
|||
// opts.challengeType = 'http-01';
|
|||
// opts.challenge = require('le-challenge-fs').create({});
|
|||
return hostname; |
|||
}) |
|||
.catch(function() { |
|||
if ("www." === hostname.slice(0, 4)) { |
|||
// Assume we'll redirect to non-www if it's available.
|
|||
hostname = hostname.slice(4); |
|||
hostdir = path.join(srv, hostname); |
|||
return fs.readdir(hostdir).then(function() { |
|||
// TODO list both domains?
|
|||
return hostname; |
|||
}); |
|||
} else { |
|||
// Or check and see if perhaps we should redirect non-www to www
|
|||
hostname = "www." + hostname; |
|||
hostdir = path.join(srv, hostname); |
|||
return fs.readdir(hostdir).then(function() { |
|||
// TODO list both domains?
|
|||
return hostname; |
|||
}); |
|||
} |
|||
}) |
|||
.catch(function() { |
|||
throw new Error("rejecting '" + _hostname + "' because '" + _hostdir + "' could not be read"); |
|||
}); |
|||
} |
|||
|
|||
function myVhostApp(req, res) { |
|||
// SECURITY greenlock pre-sanitizes hostnames to prevent unauthorized fs access so you don't have to
|
|||
// (also: only domains approved above will get here)
|
|||
console.log("vhost:", req.headers.host); |
|||
if (!req.headers.host) { |
|||
// SECURITY, don't allow access to the 'srv' root
|
|||
// (greenlock-express uses middleware to check '..', etc)
|
|||
return res.end(); |
|||
} |
|||
|
|||
// We could cache wether or not a host exists for some amount of time
|
|||
var fin = finalhandler(req, res); |
|||
return checkWwws(req.headers.host) |
|||
.then(function(hostname) { |
|||
if (hostname !== req.headers.host) { |
|||
res.statusCode = 302; |
|||
res.setHeader("Location", "https://" + hostname); |
|||
// SECURITY this is safe only because greenlock disallows invalid hostnames
|
|||
res.end("<!-- redirecting to https://" + hostname + "-->"); |
|||
return; |
|||
} |
|||
var serve = serveStatic(path.join(srv, hostname), { redirect: true }); |
|||
serve(req, res, fin); |
|||
}) |
|||
.catch(function() { |
|||
fin(); |
|||
}); |
|||
} |
@ -0,0 +1,77 @@ |
|||
#!/usr/bin/env node
|
|||
"use strict"; |
|||
/*global Promise*/ |
|||
|
|||
///////////////////////
|
|||
// wildcard example //
|
|||
//////////////////////
|
|||
|
|||
//
|
|||
// wildcard example
|
|||
//
|
|||
|
|||
//var glx = require('greenlock-express')
|
|||
var glx = require("../").create({ |
|||
version: "draft-11", // Let's Encrypt v2 is ACME draft 11
|
|||
|
|||
server: "https://acme-staging-v02.api.letsencrypt.org/directory", |
|||
//, server: 'https://acme-v02.api.letsencrypt.org/directory' // If at first you don't succeed, stop and switch to staging
|
|||
// https://acme-staging-v02.api.letsencrypt.org/directory
|
|||
|
|||
configDir: "~/acme/", // You MUST have access to write to directory where certs
|
|||
// are saved. ex: /home/foouser/.config/acme
|
|||
|
|||
approveDomains: myApproveDomains, // Greenlock's wraps around tls.SNICallback. Check the
|
|||
// domain name here and reject invalid ones
|
|||
|
|||
app: require("./my-express-app.js"), // Any node-style http app (i.e. express, koa, hapi, rill)
|
|||
|
|||
/* CHANGE TO A VALID EMAIL */ |
|||
email: "jon.doe@example.com", // Email for Let's Encrypt account and Greenlock Security
|
|||
agreeTos: true, // Accept Let's Encrypt ToS
|
|||
communityMember: true, // Join Greenlock to (very rarely) get important updates
|
|||
|
|||
//, debug: true
|
|||
store: require("le-store-fs") |
|||
}); |
|||
|
|||
var server = glx.listen(80, 443); |
|||
server.on("listening", function() { |
|||
console.info(server.type + " listening on", server.address()); |
|||
}); |
|||
|
|||
function myApproveDomains(opts) { |
|||
console.log("sni:", opts.domain); |
|||
|
|||
// must be 'example.com' or start with 'example.com'
|
|||
if ( |
|||
"example.com" !== opts.domain && |
|||
"example.com" !== |
|||
opts.domain |
|||
.split(".") |
|||
.slice(1) |
|||
.join(".") |
|||
) { |
|||
return Promise.reject(new Error("we don't serve your kind here: " + opts.domain)); |
|||
} |
|||
|
|||
// the primary domain for the cert
|
|||
opts.subject = "example.com"; |
|||
// the altnames (including the primary)
|
|||
opts.domains = [opts.subject, "*.example.com"]; |
|||
|
|||
if (!opts.challenges) { |
|||
opts.challenges = {}; |
|||
} |
|||
opts.challenges["http-01"] = require("le-challenge-fs").create({}); |
|||
// Note: When implementing a dns-01 plugin you should make it check in a loop
|
|||
// until it can positively confirm that the DNS changes have propagated.
|
|||
// That could take several seconds to a few minutes.
|
|||
opts.challenges["dns-01"] = require("le-challenge-dns").create({}); |
|||
|
|||
// explicitly set account id and certificate.id
|
|||
opts.account = { id: opts.email }; |
|||
opts.certificate = { id: opts.subject }; |
|||
|
|||
return Promise.resolve(opts); |
|||
} |
@ -1,32 +1,32 @@ |
|||
"use strict"; |
|||
|
|||
function httpsWorker(glx) { |
|||
// This can be a node http app (shown),
|
|||
// an Express app, or Hapi, Koa, Rill, etc
|
|||
var app = function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}; |
|||
// This can be a node http app (shown),
|
|||
// an Express app, or Hapi, Koa, Rill, etc
|
|||
var app = function(req, res) { |
|||
res.end("Hello, Encrypted World!"); |
|||
}; |
|||
|
|||
// Serves on 80 and 443
|
|||
// Get's SSL certificates magically!
|
|||
glx.serveApp(app); |
|||
// Serves on 80 and 443
|
|||
// Get's SSL certificates magically!
|
|||
glx.serveApp(app); |
|||
} |
|||
|
|||
var pkg = require("../../package.json"); |
|||
//require("greenlock-express")
|
|||
require("../../") |
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
|
|||
return { |
|||
// Package name+version is used for ACME client user agent
|
|||
package: { name: "websocket-example", version: pkg.version }, |
|||
return { |
|||
// Package name+version is used for ACME client user agent
|
|||
package: { name: "websocket-example", version: pkg.version }, |
|||
|
|||
// Maintainer email is the contact for critical bug and security notices
|
|||
maintainerEmail: "jon@example.com", |
|||
// Maintainer email is the contact for critical bug and security notices
|
|||
maintainerEmail: "jon@example.com", |
|||
|
|||
// Change to true when you're ready to make your app cloud-scale
|
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
// Change to true when you're ready to make your app cloud-scale
|
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
|
@ -1,42 +1,42 @@ |
|||
"use strict"; |
|||
|
|||
function httpsWorker(glx) { |
|||
// we need the raw https server
|
|||
var server = glx.httpsServer(); |
|||
var WebSocket = require("ws"); |
|||
var ws = new WebSocket.Server({ server: server }); |
|||
ws.on("connection", function(ws, req) { |
|||
// inspect req.headers.authorization (or cookies) for session info
|
|||
ws.send( |
|||
"[Secure Echo Server] Hello!\nAuth: '" + |
|||
(req.headers.authorization || "none") + |
|||
"'\n" + |
|||
"Cookie: '" + |
|||
(req.headers.cookie || "none") + |
|||
"'\n" |
|||
); |
|||
ws.on("message", function(data) { |
|||
ws.send(data); |
|||
}); |
|||
}); |
|||
// we need the raw https server
|
|||
var server = glx.httpsServer(); |
|||
var WebSocket = require("ws"); |
|||
var ws = new WebSocket.Server({ server: server }); |
|||
ws.on("connection", function(ws, req) { |
|||
// inspect req.headers.authorization (or cookies) for session info
|
|||
ws.send( |
|||
"[Secure Echo Server] Hello!\nAuth: '" + |
|||
(req.headers.authorization || "none") + |
|||
"'\n" + |
|||
"Cookie: '" + |
|||
(req.headers.cookie || "none") + |
|||
"'\n" |
|||
); |
|||
ws.on("message", function(data) { |
|||
ws.send(data); |
|||
}); |
|||
}); |
|||
|
|||
// servers a node app that proxies requests to a localhost
|
|||
glx.serveApp(function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.end("Hello, World!\n\n💚 🔒.js"); |
|||
}); |
|||
// servers a node app that proxies requests to a localhost
|
|||
glx.serveApp(function(req, res) { |
|||
res.setHeader("Content-Type", "text/html; charset=utf-8"); |
|||
res.end("Hello, World!\n\n💚 🔒.js"); |
|||
}); |
|||
} |
|||
|
|||
var pkg = require("../../package.json"); |
|||
//require("greenlock-express")
|
|||
require("../../") |
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
.init(function getConfig() { |
|||
// Greenlock Config
|
|||
|
|||
return { |
|||
package: { name: "websocket-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
return { |
|||
package: { name: "websocket-example", version: pkg.version }, |
|||
maintainerEmail: "jon@example.com", |
|||
cluster: false |
|||
}; |
|||
}) |
|||
.serve(httpsWorker); |
|||
|
@ -1,37 +1,37 @@ |
|||
"use strict"; |
|||
|
|||
function requireBluebird() { |
|||
try { |
|||
return require("bluebird"); |
|||
} catch (e) { |
|||
console.error(""); |
|||
console.error("DON'T PANIC. You're running an old version of node with incomplete Promise support."); |
|||
console.error("EASY FIX: `npm install --save bluebird`"); |
|||
console.error(""); |
|||
throw e; |
|||
} |
|||
try { |
|||
return require("bluebird"); |
|||
} catch (e) { |
|||
console.error(""); |
|||
console.error("DON'T PANIC. You're running an old version of node with incomplete Promise support."); |
|||
console.error("EASY FIX: `npm install --save bluebird`"); |
|||
console.error(""); |
|||
throw e; |
|||
} |
|||
} |
|||
|
|||
if ("undefined" === typeof Promise) { |
|||
global.Promise = requireBluebird(); |
|||
global.Promise = requireBluebird(); |
|||
} |
|||
|
|||
if ("function" !== typeof require("util").promisify) { |
|||
require("util").promisify = requireBluebird().promisify; |
|||
require("util").promisify = requireBluebird().promisify; |
|||
} |
|||
|
|||
if (!console.debug) { |
|||
console.debug = console.log; |
|||
console.debug = console.log; |
|||
} |
|||
|
|||
var fs = require("fs"); |
|||
var fsAsync = {}; |
|||
Object.keys(fs).forEach(function(key) { |
|||
var fn = fs[key]; |
|||
if ("function" !== typeof fn || !/[a-z]/.test(key[0])) { |
|||
return; |
|||
} |
|||
fsAsync[key] = require("util").promisify(fn); |
|||
var fn = fs[key]; |
|||
if ("function" !== typeof fn || !/[a-z]/.test(key[0])) { |
|||
return; |
|||
} |
|||
fsAsync[key] = require("util").promisify(fn); |
|||
}); |
|||
|
|||
exports.fsAsync = fsAsync; |
|||
|
@ -1,140 +1,140 @@ |
|||
{ |
|||
"name": "@root/greenlock-express", |
|||
"version": "3.0.11", |
|||
"lockfileVersion": 1, |
|||
"requires": true, |
|||
"dependencies": { |
|||
"@root/acme": { |
|||
"version": "3.0.8", |
|||
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.0.8.tgz", |
|||
"integrity": "sha512-VmBvLvWdCDkolkanI9Dzm1ouSWPaAa2eCCwcDZcVQbWoNiUIOqbbd57fcMA/gZxLyuJPStD2WXFuEuSMPDxcww==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1", |
|||
"@root/keypairs": "^0.9.0", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/request": "^1.3.11", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/asn1": { |
|||
"version": "1.0.0", |
|||
"resolved": "https://registry.npmjs.org/@root/asn1/-/asn1-1.0.0.tgz", |
|||
"integrity": "sha512-0lfZNuOULKJDJmdIkP8V9RnbV3XaK6PAHD3swnFy4tZwtlMDzLKoM/dfNad7ut8Hu3r91wy9uK0WA/9zym5mig==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1" |
|||
} |
|||
}, |
|||
"@root/csr": { |
|||
"version": "0.8.1", |
|||
"resolved": "https://registry.npmjs.org/@root/csr/-/csr-0.8.1.tgz", |
|||
"integrity": "sha512-hKl0VuE549TK6SnS2Yn9nRvKbFZXn/oAg+dZJU/tlKl/f/0yRXeuUzf8akg3JjtJq+9E592zDqeXZ7yyrg8fSQ==", |
|||
"requires": { |
|||
"@root/asn1": "^1.0.0", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/encoding": { |
|||
"version": "1.0.1", |
|||
"resolved": "https://registry.npmjs.org/@root/encoding/-/encoding-1.0.1.tgz", |
|||
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ==" |
|||
}, |
|||
"@root/greenlock": { |
|||
"version": "3.0.25", |
|||
"resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-3.0.25.tgz", |
|||
"integrity": "sha512-VC8H9MTkbqxlB2LGntmcq5cstkE0TdZLvxm25SO5i7c6abJBVMQafhTD415OXwoGimnmWTn6SZ93Fj73d9QX/w==", |
|||
"requires": { |
|||
"@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", |
|||
"acme-http-01-standalone": "^3.0.5", |
|||
"cert-info": "^1.5.1", |
|||
"greenlock-manager-fs": "^3.0.1", |
|||
"greenlock-store-fs": "^3.2.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"@root/keypairs": { |
|||
"version": "0.9.0", |
|||
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.9.0.tgz", |
|||
"integrity": "sha512-NXE2L9Gv7r3iC4kB/gTPZE1vO9Ox/p14zDzAJ5cGpTpytbWOlWF7QoHSJbtVX4H7mRG/Hp7HR3jWdWdb2xaaXg==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/mkdirp": { |
|||
"version": "1.0.0", |
|||
"resolved": "https://registry.npmjs.org/@root/mkdirp/-/mkdirp-1.0.0.tgz", |
|||
"integrity": "sha512-hxGAYUx5029VggfG+U9naAhQkoMSXtOeXtbql97m3Hi6/sQSRL/4khKZPyOF6w11glyCOU38WCNLu9nUcSjOfA==" |
|||
}, |
|||
"@root/pem": { |
|||
"version": "1.0.4", |
|||
"resolved": "https://registry.npmjs.org/@root/pem/-/pem-1.0.4.tgz", |
|||
"integrity": "sha512-rEUDiUsHtild8GfIjFE9wXtcVxeS+ehCJQBwbQQ3IVfORKHK93CFnRtkr69R75lZFjcmKYVc+AXDB+AeRFOULA==" |
|||
}, |
|||
"@root/request": { |
|||
"version": "1.4.2", |
|||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.4.2.tgz", |
|||
"integrity": "sha512-J8FM4+SJuc7WRC+Jz17m+VT2lgI7HtatHhxN1F2ck5aIKUAxJEaR4u/gLBsgT60mVHevKCjKN0O8115UtJjwLw==" |
|||
}, |
|||
"@root/x509": { |
|||
"version": "0.7.2", |
|||
"resolved": "https://registry.npmjs.org/@root/x509/-/x509-0.7.2.tgz", |
|||
"integrity": "sha512-ENq3LGYORK5NiMFHEVeNMt+fTXaC7DTS6sQXoqV+dFdfT0vmiL5cDLjaXQhaklJQq0NiwicZegzJRl1ZOTp3WQ==", |
|||
"requires": { |
|||
"@root/asn1": "^1.0.0", |
|||
"@root/encoding": "^1.0.1" |
|||
} |
|||
}, |
|||
"acme-http-01-standalone": { |
|||
"version": "3.0.5", |
|||
"resolved": "https://registry.npmjs.org/acme-http-01-standalone/-/acme-http-01-standalone-3.0.5.tgz", |
|||
"integrity": "sha512-W4GfK+39GZ+u0mvxRVUcVFCG6gposfzEnSBF20T/NUwWAKG59wQT1dUbS1NixRIAsRuhpGc4Jx659cErFQH0Pg==" |
|||
}, |
|||
"cert-info": { |
|||
"version": "1.5.1", |
|||
"resolved": "https://registry.npmjs.org/cert-info/-/cert-info-1.5.1.tgz", |
|||
"integrity": "sha512-eoQC/yAgW3gKTKxjzyClvi+UzuY97YCjcl+lSqbsGIy7HeGaWxCPOQFivhUYm27hgsBMhsJJFya3kGvK6PMIcQ==" |
|||
}, |
|||
"escape-html": { |
|||
"version": "1.0.3", |
|||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", |
|||
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" |
|||
}, |
|||
"greenlock-manager-fs": { |
|||
"version": "3.0.1", |
|||
"resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.0.1.tgz", |
|||
"integrity": "sha512-vZfGFq1TTKxaAqdGDUwNservrNzXx0xCwT/ovG/N378GrhS+U5S8B8LUlNtQU7Fdw6RToMiBcm22OOxSrvZ2zw==", |
|||
"requires": { |
|||
"@root/mkdirp": "^1.0.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"greenlock-store-fs": { |
|||
"version": "3.2.0", |
|||
"resolved": "https://registry.npmjs.org/greenlock-store-fs/-/greenlock-store-fs-3.2.0.tgz", |
|||
"integrity": "sha512-zqcPnF+173oYq5qU7FoGtuqeG8dmmvAiSnz98kEHAHyvgRF9pE1T0MM0AuqDdj45I3kXlCj2gZBwutnRi37J3g==", |
|||
"requires": { |
|||
"@root/mkdirp": "^1.0.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"redirect-https": { |
|||
"version": "1.3.0", |
|||
"resolved": "https://registry.npmjs.org/redirect-https/-/redirect-https-1.3.0.tgz", |
|||
"integrity": "sha512-9GzwI/+Cqw3jlSg0CW6TgBQbhiVhkHSDvW8wjgRQ9IK34wtxS71YJiQeazSCSEqbvowHCJuQZgmQFl1xUHKEgg==", |
|||
"requires": { |
|||
"escape-html": "^1.0.3" |
|||
} |
|||
}, |
|||
"safe-replace": { |
|||
"version": "1.1.0", |
|||
"resolved": "https://registry.npmjs.org/safe-replace/-/safe-replace-1.1.0.tgz", |
|||
"integrity": "sha512-9/V2E0CDsKs9DWOOwJH7jYpSl9S3N05uyevNjvsnDauBqRowBPOyot1fIvV5N2IuZAbYyvrTXrYFVG0RZInfFw==" |
|||
} |
|||
} |
|||
"name": "@root/greenlock-express", |
|||
"version": "3.0.13", |
|||
"lockfileVersion": 1, |
|||
"requires": true, |
|||
"dependencies": { |
|||
"@root/acme": { |
|||
"version": "3.0.8", |
|||
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.0.8.tgz", |
|||
"integrity": "sha512-VmBvLvWdCDkolkanI9Dzm1ouSWPaAa2eCCwcDZcVQbWoNiUIOqbbd57fcMA/gZxLyuJPStD2WXFuEuSMPDxcww==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1", |
|||
"@root/keypairs": "^0.9.0", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/request": "^1.3.11", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/asn1": { |
|||
"version": "1.0.0", |
|||
"resolved": "https://registry.npmjs.org/@root/asn1/-/asn1-1.0.0.tgz", |
|||
"integrity": "sha512-0lfZNuOULKJDJmdIkP8V9RnbV3XaK6PAHD3swnFy4tZwtlMDzLKoM/dfNad7ut8Hu3r91wy9uK0WA/9zym5mig==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1" |
|||
} |
|||
}, |
|||
"@root/csr": { |
|||
"version": "0.8.1", |
|||
"resolved": "https://registry.npmjs.org/@root/csr/-/csr-0.8.1.tgz", |
|||
"integrity": "sha512-hKl0VuE549TK6SnS2Yn9nRvKbFZXn/oAg+dZJU/tlKl/f/0yRXeuUzf8akg3JjtJq+9E592zDqeXZ7yyrg8fSQ==", |
|||
"requires": { |
|||
"@root/asn1": "^1.0.0", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/encoding": { |
|||
"version": "1.0.1", |
|||
"resolved": "https://registry.npmjs.org/@root/encoding/-/encoding-1.0.1.tgz", |
|||
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ==" |
|||
}, |
|||
"@root/greenlock": { |
|||
"version": "3.0.25", |
|||
"resolved": "https://registry.npmjs.org/@root/greenlock/-/greenlock-3.0.25.tgz", |
|||
"integrity": "sha512-VC8H9MTkbqxlB2LGntmcq5cstkE0TdZLvxm25SO5i7c6abJBVMQafhTD415OXwoGimnmWTn6SZ93Fj73d9QX/w==", |
|||
"requires": { |
|||
"@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", |
|||
"acme-http-01-standalone": "^3.0.5", |
|||
"cert-info": "^1.5.1", |
|||
"greenlock-manager-fs": "^3.0.1", |
|||
"greenlock-store-fs": "^3.2.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"@root/keypairs": { |
|||
"version": "0.9.0", |
|||
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.9.0.tgz", |
|||
"integrity": "sha512-NXE2L9Gv7r3iC4kB/gTPZE1vO9Ox/p14zDzAJ5cGpTpytbWOlWF7QoHSJbtVX4H7mRG/Hp7HR3jWdWdb2xaaXg==", |
|||
"requires": { |
|||
"@root/encoding": "^1.0.1", |
|||
"@root/pem": "^1.0.4", |
|||
"@root/x509": "^0.7.2" |
|||
} |
|||
}, |
|||
"@root/mkdirp": { |
|||
"version": "1.0.0", |
|||
"resolved": "https://registry.npmjs.org/@root/mkdirp/-/mkdirp-1.0.0.tgz", |
|||
"integrity": "sha512-hxGAYUx5029VggfG+U9naAhQkoMSXtOeXtbql97m3Hi6/sQSRL/4khKZPyOF6w11glyCOU38WCNLu9nUcSjOfA==" |
|||
}, |
|||
"@root/pem": { |
|||
"version": "1.0.4", |
|||
"resolved": "https://registry.npmjs.org/@root/pem/-/pem-1.0.4.tgz", |
|||
"integrity": "sha512-rEUDiUsHtild8GfIjFE9wXtcVxeS+ehCJQBwbQQ3IVfORKHK93CFnRtkr69R75lZFjcmKYVc+AXDB+AeRFOULA==" |
|||
}, |
|||
"@root/request": { |
|||
"version": "1.4.2", |
|||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.4.2.tgz", |
|||
"integrity": "sha512-J8FM4+SJuc7WRC+Jz17m+VT2lgI7HtatHhxN1F2ck5aIKUAxJEaR4u/gLBsgT60mVHevKCjKN0O8115UtJjwLw==" |
|||
}, |
|||
"@root/x509": { |
|||
"version": "0.7.2", |
|||
"resolved": "https://registry.npmjs.org/@root/x509/-/x509-0.7.2.tgz", |
|||
"integrity": "sha512-ENq3LGYORK5NiMFHEVeNMt+fTXaC7DTS6sQXoqV+dFdfT0vmiL5cDLjaXQhaklJQq0NiwicZegzJRl1ZOTp3WQ==", |
|||
"requires": { |
|||
"@root/asn1": "^1.0.0", |
|||
"@root/encoding": "^1.0.1" |
|||
} |
|||
}, |
|||
"acme-http-01-standalone": { |
|||
"version": "3.0.5", |
|||
"resolved": "https://registry.npmjs.org/acme-http-01-standalone/-/acme-http-01-standalone-3.0.5.tgz", |
|||
"integrity": "sha512-W4GfK+39GZ+u0mvxRVUcVFCG6gposfzEnSBF20T/NUwWAKG59wQT1dUbS1NixRIAsRuhpGc4Jx659cErFQH0Pg==" |
|||
}, |
|||
"cert-info": { |
|||
"version": "1.5.1", |
|||
"resolved": "https://registry.npmjs.org/cert-info/-/cert-info-1.5.1.tgz", |
|||
"integrity": "sha512-eoQC/yAgW3gKTKxjzyClvi+UzuY97YCjcl+lSqbsGIy7HeGaWxCPOQFivhUYm27hgsBMhsJJFya3kGvK6PMIcQ==" |
|||
}, |
|||
"escape-html": { |
|||
"version": "1.0.3", |
|||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", |
|||
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" |
|||
}, |
|||
"greenlock-manager-fs": { |
|||
"version": "3.0.1", |
|||
"resolved": "https://registry.npmjs.org/greenlock-manager-fs/-/greenlock-manager-fs-3.0.1.tgz", |
|||
"integrity": "sha512-vZfGFq1TTKxaAqdGDUwNservrNzXx0xCwT/ovG/N378GrhS+U5S8B8LUlNtQU7Fdw6RToMiBcm22OOxSrvZ2zw==", |
|||
"requires": { |
|||
"@root/mkdirp": "^1.0.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"greenlock-store-fs": { |
|||
"version": "3.2.0", |
|||
"resolved": "https://registry.npmjs.org/greenlock-store-fs/-/greenlock-store-fs-3.2.0.tgz", |
|||
"integrity": "sha512-zqcPnF+173oYq5qU7FoGtuqeG8dmmvAiSnz98kEHAHyvgRF9pE1T0MM0AuqDdj45I3kXlCj2gZBwutnRi37J3g==", |
|||
"requires": { |
|||
"@root/mkdirp": "^1.0.0", |
|||
"safe-replace": "^1.1.0" |
|||
} |
|||
}, |
|||
"redirect-https": { |
|||
"version": "1.3.0", |
|||
"resolved": "https://registry.npmjs.org/redirect-https/-/redirect-https-1.3.0.tgz", |
|||
"integrity": "sha512-9GzwI/+Cqw3jlSg0CW6TgBQbhiVhkHSDvW8wjgRQ9IK34wtxS71YJiQeazSCSEqbvowHCJuQZgmQFl1xUHKEgg==", |
|||
"requires": { |
|||
"escape-html": "^1.0.3" |
|||
} |
|||
}, |
|||
"safe-replace": { |
|||
"version": "1.1.0", |
|||
"resolved": "https://registry.npmjs.org/safe-replace/-/safe-replace-1.1.0.tgz", |
|||
"integrity": "sha512-9/V2E0CDsKs9DWOOwJH7jYpSl9S3N05uyevNjvsnDauBqRowBPOyot1fIvV5N2IuZAbYyvrTXrYFVG0RZInfFw==" |
|||
} |
|||
} |
|||
} |
|||
|
@ -1,51 +1,51 @@ |
|||
{ |
|||
"name": "@root/greenlock-express", |
|||
"version": "3.0.12", |
|||
"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", |
|||
"files": [ |
|||
"*.js", |
|||
"lib", |
|||
"scripts" |
|||
], |
|||
"scripts": { |
|||
"start": "node_todo server.js ./config.js", |
|||
"test": "node_todo test/greenlock.js" |
|||
}, |
|||
"directories": { |
|||
"example": "examples" |
|||
}, |
|||
"dependencies": { |
|||
"@root/greenlock": "^3.0.25", |
|||
"redirect-https": "^1.1.5" |
|||
}, |
|||
"trulyOptionalDependencies": { |
|||
"http-proxy": "^1.17.0", |
|||
"express": "^4.16.3", |
|||
"express-basic-auth": "^1.2.0", |
|||
"finalhandler": "^1.1.1", |
|||
"serve-index": "^1.9.1", |
|||
"serve-static": "^1.13.2", |
|||
"ws": "^5.2.1" |
|||
}, |
|||
"devDependencies": {}, |
|||
"repository": { |
|||
"type": "git", |
|||
"url": "https://git.rootprojects.org/root/greenlock-express.js.git" |
|||
}, |
|||
"keywords": [ |
|||
"Let's Encrypt", |
|||
"ACME", |
|||
"greenlock", |
|||
"Free SSL", |
|||
"Automated HTTPS", |
|||
"https", |
|||
"tls" |
|||
], |
|||
"author": "AJ ONeal <coolaj86@gmail.com> (https://solderjs.com/)", |
|||
"license": "MPL-2.0", |
|||
"bugs": { |
|||
"url": "https://git.rootprojects.org/root/greenlock-express.js/issues" |
|||
} |
|||
"name": "@root/greenlock-express", |
|||
"version": "3.0.13", |
|||
"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", |
|||
"files": [ |
|||
"*.js", |
|||
"lib", |
|||
"scripts" |
|||
], |
|||
"scripts": { |
|||
"start": "node_todo server.js ./config.js", |
|||
"test": "node_todo test/greenlock.js" |
|||
}, |
|||
"directories": { |
|||
"example": "examples" |
|||
}, |
|||
"dependencies": { |
|||
"@root/greenlock": "^3.0.25", |
|||
"redirect-https": "^1.1.5" |
|||
}, |
|||
"trulyOptionalDependencies": { |
|||
"http-proxy": "^1.17.0", |
|||
"express": "^4.16.3", |
|||
"express-basic-auth": "^1.2.0", |
|||
"finalhandler": "^1.1.1", |
|||
"serve-index": "^1.9.1", |
|||
"serve-static": "^1.13.2", |
|||
"ws": "^5.2.1" |
|||
}, |
|||
"devDependencies": {}, |
|||
"repository": { |
|||
"type": "git", |
|||
"url": "https://git.rootprojects.org/root/greenlock-express.js.git" |
|||
}, |
|||
"keywords": [ |
|||
"Let's Encrypt", |
|||
"ACME", |
|||
"greenlock", |
|||
"Free SSL", |
|||
"Automated HTTPS", |
|||
"https", |
|||
"tls" |
|||
], |
|||
"author": "AJ ONeal <coolaj86@gmail.com> (https://solderjs.com/)", |
|||
"license": "MPL-2.0", |
|||
"bugs": { |
|||
"url": "https://git.rootprojects.org/root/greenlock-express.js/issues" |
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue