Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server API ergonomics #220

Closed
slinkydeveloper opened this issue Dec 22, 2023 · 0 comments · Fixed by #221
Closed

Server API ergonomics #220

slinkydeveloper opened this issue Dec 22, 2023 · 0 comments · Fixed by #221
Assignees
Labels

Comments

@slinkydeveloper
Copy link
Contributor

slinkydeveloper commented Dec 22, 2023

While working on restatedev/node-template-generator#18 I stumbled on several issues:

  • It's unclear how to start the server on port 0.
  • I can't get notified on when the server starts listening, and then continue the execution
  • I can't stop the server
  • I can't add server options myself Allow to pass http2.ServerOptions #219

Perhaps we should align the server object in a similar fashion to express https://expressjs.com/it/4x/api.html#app.listen, where basically server just implements a request handler and a user can use the regular node APIs to start/stop server, define options etc.

We can do that while still providing the "helper" method listen as we have it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant