File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ Send status dashboard updates to a Socket.IO compliant server.
8
8
9
9
### Install
10
10
11
- Install the 'sd-socketio-plugin' plugin in status dashboard as defined at https://github.com/obazoud/statusdashboard#external-plugins
11
+ Install the 'sd-socketio-plugin' plugin in status dashboard as defined at https://github.com/obazoud/statusdashboard#external-plugins :
12
+
13
+ - Download/clone/install statusdashboard
14
+ - Install the plugin 'npm install sd-socketio-plugin'
15
+ - Add the plugin to the configuration file (plugins.json)
12
16
13
17
### Configure
14
18
@@ -20,7 +24,7 @@ Add the socket.io information to the status dashboad settings:
20
24
url : 'http://localhost:3000'
21
25
}
22
26
23
- Where the URL is a Socket.IO compliant server.
27
+ Where the URL is a Socket.IO compliant server. If not set, it will default to ' http://localhost:3303 '.
24
28
25
29
## Sample
26
30
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ module.exports = function(statusdb) {
12
12
var api = statusdb . api ;
13
13
var settings = statusdb . settings ;
14
14
15
- var url = settings . plugins . socketio . url || 'http://localhost:3303' ;
15
+ var url = 'http://localhost:3303' ;
16
+ if ( settings . plugins . socketio ) {
17
+ url = settings . plugins . socketio . url || url ;
18
+ }
16
19
var socket = io . connect ( url ) ;
17
20
18
21
socket . on ( 'connect' , function ( ) {
You can’t perform that action at this time.
0 commit comments