feature(cloudcmd) add support of express mounting point (#200)

This commit is contained in:
coderaiser 2018-10-23 18:12:05 +03:00
parent 8a92c97485
commit 51ee3773f7
7 changed files with 15 additions and 47 deletions

View file

@ -40,7 +40,10 @@ module.exports = async (options) => {
if (logger)
app.use(logger('dev'));
app.use(cloudcmd({
if (prefix)
app.get('/', (req, res) => res.redirect(prefix + '/'));
app.use(prefix, cloudcmd({
config: options,
socket: io(server, {
path: `${prefix}/socket.io`,