A very dumb client implementation for testing the RemoteHelper, in Node.js.
This client implements a simple use case of the RemoteHelper. For it to work properly, the RemoteHelper must already be running.
You can configure where this client is supposed to look for the RemoteHelper in the config file.
Start the client by running
node server.js
.
This will create an HTTP server
which receives events from the RemoteHelper
and responds to them,
and it will also issue an image help request
to the RemoteHelper.
The use case implemented is the following:
the client listens for a total of 10 events
(for instance, 5 mouse clicks --
each one triggers mouseup
and mousedown
)
and then tells the RemoteHelper
that the help job is done.
In addition, for mouseup
events,
if the click is on the upper-right side
of the screen,
it sends a new mediaURL
(a new image)
for the RemoteHelper to update the static page.