mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2024-11-16 17:28:59 +00:00 
			
		
		
		
	whitespace
This commit is contained in:
		
							parent
							
								
									00e9d96f8b
								
							
						
					
					
						commit
						3f437c6ebb
					
				| @ -135,7 +135,7 @@ later, if you need them. | |||||||
| 
 | 
 | ||||||
| `server.js`: | `server.js`: | ||||||
| 
 | 
 | ||||||
| ```bash | ```js | ||||||
| require("greenlock-express") | require("greenlock-express") | ||||||
| 	.init(getConfig) | 	.init(getConfig) | ||||||
| 	.serve(worker); | 	.serve(worker); | ||||||
| @ -143,14 +143,14 @@ require("greenlock-express") | |||||||
| function getConfig() { | function getConfig() { | ||||||
| 	return { | 	return { | ||||||
| 		// uses name and version as part of the ACME client user-agent | 		// uses name and version as part of the ACME client user-agent | ||||||
|     // uses author as the contact for support notices | 		// uses author as the contact for support notices | ||||||
| 		package: require("./package.json") | 		package: require("./package.json") | ||||||
| 	}; | 	}; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function worker(server) { | function worker(server) { | ||||||
| 	// Works with any Node app (Express, etc) | 	// Works with any Node app (Express, etc) | ||||||
|   var app = require('my-express-app.js'); | 	var app = require("my-express-app.js"); | ||||||
| 	server.serveApp(app); | 	server.serveApp(app); | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
									
									
									
									
								
							| @ -32,5 +32,5 @@ if (major < 11 || (11 === major && minor < 2)) { | |||||||
| 
 | 
 | ||||||
| if (shouldUpgrade) { | if (shouldUpgrade) { | ||||||
| 	console.warn("Warning: Please upgrade to node v11.2.0 or greater."); | 	console.warn("Warning: Please upgrade to node v11.2.0 or greater."); | ||||||
|   console.warn(); | 	console.warn(); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								master.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								master.js
									
									
									
									
									
								
							| @ -75,11 +75,11 @@ Master._spawnWorkers = function(opts, greenlock) { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|   cluster.on('exit', function () { | 	cluster.on("exit", function() { | ||||||
|     setTimeout(function () { | 		setTimeout(function() { | ||||||
|       process.exit(3); | 			process.exit(3); | ||||||
|     }, 100); | 		}, 100); | ||||||
|   }); | 	}); | ||||||
| 
 | 
 | ||||||
| 	var workers = range(numWorkers); | 	var workers = range(numWorkers); | ||||||
| 	function next() { | 	function next() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user