Closed pik closed 8 years ago
The README mentions that if you're using Foreman, or something similar, you'll only want to start it for a single process. Perhaps the comment on the development condition should also mention that.
In regards to configuring a static port, you should be able to set them manually in the configuration via the socket_options
and web_options
. The defaults are a random available port to make it easier to use in general. I think I want to avoid writing the resolved ports to a file, at least from within the library.
Added to the comment in 338c91a5ee911723c0246cf9626129ee76db2f56.
Let me know if you have any questions on configuring the static ports.
The currently suggested advice in the README is to add
require "pusher-fake/support/base"
to an initializer, the problem with this approach is that Rails Console and Rails Server will now each initiate a pusher-fake webserver. One can add something like thisif Rails.const_defined? 'Server'
to guard for this, but now Rails Console won't have normal access toPusher.trigger
commands as it would in a production environment since it's own PusherFake socket_options do not match the ones generated by the server initializer. I can think of two ways of handling this:a) Allow PusherFake to be configured with a static port. b) Write the dynamically resolved port to a lock-file which the initializer can read.
Perhaps there are better alternatives?