Mark as Mirror

This commit is contained in:
AJ ONeal 2020-08-03 01:06:05 -06:00
parent ca0ba9bc68
commit 34a0475b9d
1 changed files with 29 additions and 20 deletions

View File

@ -1,3 +1,10 @@
# Mirror of git.rootprojects.org/root/greenlock-express.js
Github does not expose the ability to automatically update mirrors,
so this may lag behind the official repository which is found at:
- <https://git.rootprojects.org/root/greenlock-express.js>
# [Greenlock Express v4](https://git.rootprojects.org/root/greenlock-express.js) is Let's Encrypt for Node
| Built by [Root](https://therootcompany.com) for [Hub](https://rootprojects.org/hub/) |
@ -167,16 +174,16 @@ Create `server.js` like so:
`server.js`:
```js
'use strict';
"use strict";
var app = require('./app.js');
var app = require("./app.js");
require('greenlock-express')
require("greenlock-express")
.init({
packageRoot: __dirname,
// where to look for configuration
configDir: './greenlock.d',
configDir: "./greenlock.d",
// whether or not to run at cloudscale
cluster: false
@ -191,12 +198,12 @@ Create `app.js` like so:
`app.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) {
res.end('Hello, Encrypted World!');
res.end("Hello, Encrypted World!");
};
module.exports = app;
@ -281,19 +288,21 @@ echo '<h1>Hello!</h1>' >> public/index.html
`app.js`:
```js
'use strict';
"use strict";
var path = require('path');
var express = require('express');
var path = require("path");
var express = require("express");
var app = express();
app.get('/', express.static(path.join(__dirname, "public")));
app.get("/", express.static(path.join(__dirname, "public")));
module.exports = app;
// for development and debugging
if (require.main === module) {
require('http').createServer(app).listen(3000, function () {
require("http")
.createServer(app)
.listen(3000, function () {
console.info("Listening for HTTP on", this.address());
});
}
@ -333,8 +342,8 @@ To see all of the examples, just browse [greenlock-express.js/examples/](https:/
[ex-cicd]: https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/ci-cd/
[ex-http-proxy]: https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/http-proxy/
# FAQ
## 1. But did YOU read the QuickStart?
99% of the questions I get are answered in the QuickStart, or in the Examples.