gboudreau / certbot-heroku

Let's Encrypt (certbot) plugin for Heroku apps
Other
44 stars 12 forks source link

HOW TO: NodeJS server. #5

Closed PunkHaz4rd closed 7 years ago

PunkHaz4rd commented 7 years ago

Is there a way for you to provide an example of server configuration for NodeJS user ? Thanks

gboudreau commented 7 years ago

I don't do node.js myself, so I wouldn't know. I would guess that would depend on what framework you use to route the incoming HTTP requests...

(Side note: why are you not using Heroku' new automated certificate management feature? It pretty much deprecates this plugin here, except if you're using the free plan.)

PunkHaz4rd commented 7 years ago

Oh :/ I didn't know it existed in the first place. Sorry.

gboudreau commented 7 years ago

No problem. Still a valid question for users of the free plan. I added a note about ACM at the top of the README, since ACM is new, and was made available after I published this plugin.

EcZachly commented 7 years ago

So I got this working using NodeJS with this route: router.get('/.well-known/acme-challenge/:str', function(req, res){ res.send(process.env.LETS_ENCRYPT_CHALLENGE); });

gboudreau commented 7 years ago

Thanks. Committed a sample node.js script that uses that.