From 54352af7283cdbdc84196902475d6c715bcf9850 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 20 Feb 2016 11:50:24 -0500 Subject: [PATCH] docs(readme) Using as Middleware: add socket path --- HELP.md | 8 +++++--- README.md | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/HELP.md b/HELP.md index 4d2f0020..cfc23344 100644 --- a/HELP.md +++ b/HELP.md @@ -280,17 +280,19 @@ var http = require('http'), app = express(), PORT = 1337, - + PREFIX = '/cloudcmd', server, socket; server = http.createServer(app); -socket = io.listen(server); +socket = io.listen(server, { + path: PREFIX + '/socket.io' +}); app.use(cloudcmd({ socket: socket, /* used by Config, Edit (optional) and Console (required) */ config: { /* config data (optional) */ - prefix: '/cloudcmd', /* base URL or function which returns base URL (optional) */ + prefix: PREFIX, /* base URL or function which returns base URL (optional) */ } })); diff --git a/README.md b/README.md index 248818e1..76e71f7c 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,19 @@ var http = require('http'), app = express(), PORT = 1337, - + PREFIX = '/cloudcmd', server, socket; server = http.createServer(app); -socket = io.listen(server); +socket = io.listen(server, { + path: PREFIX + '/socket.io' +}); app.use(cloudcmd({ socket: socket, /* used by Config, Edit (optional) and Console (required) */ config: { /* config data (optional) */ - prefix: '/cloudcmd', /* base URL or function which returns base URL (optional) */ + prefix: PREFIX, /* base URL or function which returns base URL (optional) */ } }));