| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | "use strict"; | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-25 15:02:16 -07:00
										 |  |  | //require('greenlock-express')
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | require("../") | 
					
						
							|  |  |  | 	.create({ | 
					
						
							|  |  |  | 		// Let's Encrypt v2 is ACME draft 11
 | 
					
						
							|  |  |  | 		version: "draft-11", | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		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
 | 
					
						
							| 
									
										
										
										
											2018-05-19 17:54:08 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		email: "john.doe@example.com", | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		agreeTos: true, | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		approvedDomains: ["example.com", "www.example.com"], | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		app: require("express")().use("/", function(req, res) { | 
					
						
							|  |  |  | 			res.end("Hello, World!"); | 
					
						
							|  |  |  | 		}), | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		renewWithin: 91 * 24 * 60 * 60 * 1000, | 
					
						
							|  |  |  | 		renewBy: 90 * 24 * 60 * 60 * 1000, | 
					
						
							| 
									
										
										
										
											2016-08-16 13:05:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-03 03:47:07 -06:00
										 |  |  | 		// Get notified of important updates and help me make greenlock better
 | 
					
						
							|  |  |  | 		communityMember: true, | 
					
						
							|  |  |  | 		debug: true | 
					
						
							|  |  |  | 	}) | 
					
						
							|  |  |  | 	.listen(80, 443); |