mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2024-11-16 17:28:59 +00:00 
			
		
		
		
	updates for v4
This commit is contained in:
		
							parent
							
								
									224f258daa
								
							
						
					
					
						commit
						8e29cafdf5
					
				
							
								
								
									
										60
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										60
									
								
								README.md
									
									
									
									
									
								
							| @ -25,11 +25,11 @@ npm init | |||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| npm install --save greenlock-express@v3 | npm install --save greenlock-express@v4 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| npx greenlock init --maintainer-email 'jon@example.com' | npx greenlock init --maintainer-email 'jon@example.com' --config-dir ./greenlock.d | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| <details> | <details> | ||||||
| @ -65,13 +65,16 @@ require("greenlock-express") | |||||||
| var pkg = require("./package.json"); | var pkg = require("./package.json"); | ||||||
| module.exports = require("@root/greenlock").create({ | module.exports = require("@root/greenlock").create({ | ||||||
|     // name & version for ACME client user agent |     // name & version for ACME client user agent | ||||||
|     packageAgent: pkg.name + "/" + pkg.version, |     //packageAgent: pkg.name + "/" + pkg.version, | ||||||
| 
 | 
 | ||||||
|     // contact for security and critical bug notices |     // contact for security and critical bug notices | ||||||
|     maintainerEmail: pkg.author, |     maintainerEmail: pkg.author, | ||||||
| 
 | 
 | ||||||
|     // where to find .greenlockrc and set default paths |     // where to find .greenlockrc and set default paths | ||||||
|     packageRoot: __dirname |     packageRoot: __dirname, | ||||||
|  | 
 | ||||||
|  |     // where config and certificate stuff go | ||||||
|  |     configDir: "./greenlock.d" | ||||||
| }); | }); | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| @ -221,32 +224,27 @@ later, if you need them. | |||||||
| ```js | ```js | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
|  | //var pkg = require("./package.json"); | ||||||
|  | var app = require("./app.js"); | ||||||
|  | 
 | ||||||
| require("greenlock-express") | require("greenlock-express") | ||||||
|     .init(function() { |     .init({ | ||||||
|         var pkg = require("./package.json"); |         // name & version for ACME client user agent | ||||||
|         return { |         //packageAgent: pkg.name + "/" + pkg.version, | ||||||
|             greenlock: require("@root/greenlock").create({ |  | ||||||
|                 // name & version for ACME client user agent |  | ||||||
|                 packageAgent: pkg.name + "/" + pkg.version, |  | ||||||
| 
 | 
 | ||||||
|                 // contact for security and critical bug notices |         // contact for security and critical bug notices | ||||||
|                 maintainerEmail: pkg.author, |         maintainerEmail: pkg.author, | ||||||
| 
 | 
 | ||||||
|                 // where to find .greenlockrc and set default paths |         // where to find .greenlockrc and set default paths | ||||||
|                 packageRoot: __dirname |         packageRoot: __dirname, | ||||||
|             }), |  | ||||||
| 
 | 
 | ||||||
|             // whether or not to run at cloudscale |         // where config and certificate stuff go | ||||||
|             cluster: false |         configDir: "./greenlock.d", | ||||||
|         }; | 
 | ||||||
|  |         // whether or not to run at cloudscale | ||||||
|  |         cluster: false | ||||||
|     }) |     }) | ||||||
|     .ready(function(glx) { |     .serve(app); | ||||||
|         var app = require("./app.js"); |  | ||||||
| 
 |  | ||||||
|         // Serves on 80 and 443 |  | ||||||
|         // Get's SSL certificates magically! |  | ||||||
|         glx.serveApp(app); |  | ||||||
|     }); |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| And start your server: | And start your server: | ||||||
| @ -267,9 +265,8 @@ npm start -- --staging | |||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ```txt | ```txt | ||||||
| Greenlock v3.0.0 | Greenlock v4.0.0 | ||||||
| Greenlock Manager Config File: ~/.config/greenlock/manager.json | Greenlock Config Dir/File: ./greenlock.d/config.json | ||||||
| Greenlock Storage Directory: ~/.config/greenlock/ |  | ||||||
| 
 | 
 | ||||||
| Listening on 0.0.0.0:80 for ACME challenges and HTTPS redirects | 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 | ||||||
| @ -296,8 +293,10 @@ cat .greenlockrc | |||||||
| 
 | 
 | ||||||
| ```json | ```json | ||||||
| { | { | ||||||
|     "manager": "greenlock-manager-fs", |     "manager": { | ||||||
|     "configFile": "./greenlock.json" |         "module": "@greenlock/manager" | ||||||
|  |     }, | ||||||
|  |     "configDir": "./greenlock.d" | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| @ -526,4 +525,3 @@ attribution, and/or visible source policies. We want to build great software and | |||||||
| MPL-2.0 | | MPL-2.0 | | ||||||
| [Terms of Use](https://therootcompany.com/legal/#terms) | | [Terms of Use](https://therootcompany.com/legal/#terms) | | ||||||
| [Privacy Policy](https://therootcompany.com/legal/#privacy) | [Privacy Policy](https://therootcompany.com/legal/#privacy) | ||||||
| [Privacy Policy](https://therootcompany.com/legal/#privacy) |  | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|     "name": "@root/greenlock-express", |     "name": "@root/greenlock-express", | ||||||
|     "version": "3.1.1", |     "version": "4.0.0", | ||||||
|     "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