diff --git a/HELP.md b/HELP.md index dd07c75b..35e78c51 100644 --- a/HELP.md +++ b/HELP.md @@ -578,17 +578,15 @@ const io = require('socket.io'); const app = require('express')(); const port = 1337; -const prefix = '/cloudcmd'; -const socketPrefix = '/cloudcmd-sockets'; +const prefix = '/'; const server = http.createServer(app); const socket = io.listen(server, { - path: `${prefix}/socket.io` + path: `{prefix}socket.io` }); const config = { - prefix, // base URL or function which returns base URL (optional) - socketPrefix, // prefix for socket connection + name: 'cloudcmd :)' }; const plugins = [ @@ -608,7 +606,7 @@ const modules = { filePicker, }; -app.use(cloudcmd({ +app.use(prefix, cloudcmd({ socket, // used by Config, Edit (optional) and Console (required) config, // config data (optional) plugins, // optional diff --git a/README.md b/README.md index 255bf6be..1c3393de 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ const io = require('socket.io'); const app = require('express')(); const port = 1337; -const prefix = '/cloudcmd'; +const prefix = '/'; const server = http.createServer(app); const socket = io.listen(server, { @@ -87,7 +87,7 @@ const socket = io.listen(server, { }); const config = { - prefix // base URL or function which returns base URL (optional) + name: 'cloudcmd :)', }; const plugins = [ @@ -107,7 +107,7 @@ const modules = { filePicker, }; -app.use(cloudcmd({ +app.use(prefix, cloudcmd({ socket, // used by Config, Edit (optional) and Console (required) config, // config data (optional) plugins, // optional