Closed tj closed 13 years ago
A possibility to pass configuration data for this delayed server creation would be nice.
added filename support already, forgot to close this
yeah I know. But that leaves us with only two options: Preconfigure the server will all dependencies and waste a db connection, or pass a filename, that will initialize the server statically.
What if I want to have a shell script that parses command line options, loads a config file based on these options and then calls cluster, passing values from the config file to the server creation process. Right now we only could only use globals or some sort of singleton. Wouldn't a clousure to call on server creation be a better solution? Am I missing something?
Awesome library anyway, Thanks!
that would be fine too, IMO cluster(server) is the most elegant, but only works well for simple cases
master does not need to require everything that the user's server does, does not need to connect to databases etc, so this can cause master to hang when restarting etc. We have a few options... including supplying a path to
cluster()
to load the app but ONLY in the workers.regardless we need docs for this