RejectedSoftware Forums

Sign up

Add more runtime/CLI http options

What's the opinion on adding some more CLI options for configuring the
HTTP server settings? I'm thinking of flags for the following:

  • port
  • bind address
  • distribute
  • number of worker threads
  • daemon mode

Not sure if vibe.d has support for the last point.

/Jacob Carlborg

Re: Add more runtime/CLI http options

On Sun, 12 Jun 2016 12:28:56 +0200, Jacob Carlborg wrote:

What's the opinion on adding some more CLI options for configuring the
HTTP server settings? I'm thinking of flags for the following:

  • port
  • bind address
  • distribute

These are IMO too application specific to make them default options, not all applications will run a (HTTP) server.

  • number of worker threads

This would make sense.

  • daemon mode

Not sure if vibe.d has support for the last point.

Not directly, but there is a package for that: https://github.com/NCrashed/daemonize/tree/master/examples/03.Vibed. Since vibe.d is getting split up into separate libraries anyway, it probably makes sense to keep this separate. An option would be to integrate the switch into "deamonize", something like version (HaveVibeD) readOption("deamonize", &deamonize, "Detaches the application from the TTY and runs as a deamon process");

Re: Add more runtime/CLI http options

On 2016-06-20 19:02, Sönke Ludwig wrote:

These are IMO too application specific to make them default options, not all applications will run a (HTTP) server.

Fair enough.

Not directly, but there is a package for that: https://github.com/NCrashed/daemonize/tree/master/examples/03.Vibed. Since vibe.d is getting split up into separate libraries anyway, it probably makes sense to keep this separate. An option would be to integrate the switch into "deamonize", something like version (HaveVibeD) readOption("deamonize", &deamonize, "Detaches the application from the TTY and runs as a deamon process");

Cool, did not know about that package.

/Jacob Carlborg