Open EdNutting opened 3 years ago
Thanks for reporting this. I agree this is confusing, as 2 options are described with "starts LiveQuery server":
--liveQuery [liveQuery] parse-server's LiveQuery configuration
object
--liveQueryServerOptions [liveQueryServerOptions] Live query server configuration options
(will start the liveQuery server)
--startLiveQueryServer [startLiveQueryServer] Starts the liveQuery server
Do you want to submit a PR to improve the relevant --help
output?
Sorry @mtrezza, I don't have enough time at the moment. In the middle of a complete system/UI rewrite! The original issue (and report above) already used up more time than I can afford I'm afraid.
New Issue Checklist
Issue Description
As a new user, after running
parse-server --help
and reading through all the options, there are three relating to Live Query. Of these,--liveQueryServerOptions
is the one which states it will start the Live Query server. While this is technically true, it is misleading.In my experience (over the last 2 days) the
liveQueryServerOptions
option, starts live query server and allows client connections, but create/update/delete events are not pushed out to clients (though connected/subscribed messages are successfully responded to). Perhaps its that this option ignores theclassNames
property? I don't know - I really can't tell and don't have more time to burn finding out.By contrast, supplying a configuration object with just the
classNames
array field to the option--liveQuery
, and also supplying--startLiveQueryServer
(no arguments), results in a functional server that both allows connections and pushes events to clients.As such, I believe the
--help
command should print clearer information that--liveQuery "{ classNames: [...] }" --startLiveQueryServer
is the correct set of options to make this work for simple-/first- use. My search of existing issues suggests that this may be the source of a number of people's problems, and that this earlier issue recognised the problem in 2017 but did not correct for it.Steps to reproduce
parse-server --help
, to tell you what they think they should do to start Parse Server with Live Query enabled.Actual Outcome
2 days of wasted effort and a fair bit of frustration. No stress balls were harmed in the discovery or writing up of this issue.
Expected Outcome
The new user of Parse Server should quickly learn from
parse-server --help
that--liveQuery "{ classNames: [...] }" --startLiveQueryServer
will achieve the intended result. They will also learn that--liveQueryServerOptions
can be used in addition to specify further options.Environment
Windows Command Prompt inside Windows Terminal. WFH with a Brewdog Dead Pony Club beer. Not enough pizza.
Server
4.3.0
Windows 10 @ 2004
Local
Database
MongoDB
4.4.0 Community
Local
Client
JavaScript
Latest
Logs
The current output of
--help
:Relevant bits of output:
Full output: