restify / restify/node-restify
Gracefully reload server / ssl certificate
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 975
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 5
Description
More of a question, but can be turned into a feature request if it does not exist yet.
- Used appropriate template for the issue type
- Searched both open and closed issues for duplicates of this issue
- Title adequately and concisely reflects the feature or the bug
Feature Request
I am looking for a way to gracefully reload the ssl certificate of a restify server.
Use Case
SSl certificates expire and need renewals from time to time. This can easily be automated with acme.sh/certbot, but node-restify does not pick up the new certificate.
I presume this is on purpose to keep out some side effects, but i would still like this feature for my own service.
I have made a simple snippet that allows watching for file changes on the certificate, but just .close()'ing the service and then running .listen again does not seem to have the wanted effect. The cert only gets recreated when restify.createServer is called, but then all routes have to be re-initted which is not easily possible and mean i would just have to restart the whole application
Example API
for example a server.updateSettings(), or similar call?
Are you willing and able to implement this?
Yes, but it probably won't look as good, so i hope there's a workaround for now.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how restify.createServer, server.close(), and server.listen() handle the SSL certificate, using the reported acme.sh/certbot renewal flow as the reproduction context. The request needs an API decision, such as server.updateSettings(), that reloads the certificate without reinitializing routes or restarting the application; no test or source file is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100