Skip to content

Commit 3d3c2e1

Browse files
committed
Config and notes
1 parent 8aa0a2a commit 3d3c2e1

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ Send status dashboard updates to a Socket.IO compliant server.
88

99
### Install
1010

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)
1216

1317
### Configure
1418

@@ -20,7 +24,7 @@ Add the socket.io information to the status dashboad settings:
2024
url : 'http://localhost:3000'
2125
}
2226

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'.
2428

2529
## Sample
2630

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ module.exports = function(statusdb) {
1212
var api = statusdb.api;
1313
var settings = statusdb.settings;
1414

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+
}
1619
var socket = io.connect(url);
1720

1821
socket.on('connect', function() {

0 commit comments

Comments
 (0)