This is only adding a single MHub instance including configuration of host, node, user and pass.
It is not actually used by anything on the server yet.
By default, connects to MHub server on localhost with no user/pass.
To configure different host, node and credentials, start the server with e.g.:
Then, change something in a score (e.g. Publish/Unpublish) and verify that the /scoring/scores/update message is printed on the console.
Be sure to test shutting down and restarting MHub server, to verify that it reconnects automatically, and the publish/subscribe still works after that.
Tested and verified, on Windows 10, Chrome/Firefox, Node 8.6.0, NPM 5.3.0. Mserver 0.9.1. Made the modifications to the localserver.js and messages indeed got send to MHub on publish/unpublish.
Implements #285. Part of #245.
This is only adding a single MHub instance including configuration of host, node, user and pass. It is not actually used by anything on the server yet.
By default, connects to MHub server on localhost with no user/pass. To configure different host, node and credentials, start the server with e.g.:
To test whether the code works, I appended the following to the end of
localserver.js
:Then, change something in a score (e.g. Publish/Unpublish) and verify that the
/scoring/scores/update
message is printed on the console.Be sure to test shutting down and restarting MHub server, to verify that it reconnects automatically, and the publish/subscribe still works after that.