Skip to content

Commit 5b25613

Browse files
committed
Update server.js
Added a description for how the socket server behaves in parallel.
1 parent 0048d42 commit 5b25613

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

server.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ const server = http.createServer(app);
2323

2424
/**
2525
* Create the socket server.
26+
*
27+
* This runs on the same server, in parallel to the RESTful interface. At the present
28+
* time, interoperability is turned off to keep them isolated but, with a couple of
29+
* tweaks, it can easily be enabled:
30+
*
31+
* * Adjust the prefixes in socket/redis/keys.js to be the same as the RESTful ones.
32+
* * This will immediately allow the RESTful interface to see what people on sockets
33+
* are viewing/editing.
34+
* * Add redis.publish(...) calls in service/activity-service.js.
35+
* * To notify those on sockets when someone is viewing or editing a case.
2636
*/
2737
const redis = require('./app/redis/redis-client');
2838
require('./app/socket')(server, redis);

0 commit comments

Comments
 (0)