Merge pull request #171 from lqdchrm/ws-fix

fix for #170 windows paths
This commit is contained in:
Alex Sosnovskiy 2020-03-30 08:00:54 +03:00 committed by GitHub
commit c53832e132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ exports.createInstance = ({ app, server, options }) => {
}); });
app.use(options.path, api); app.use(options.path, api);
//use mountpath for WS server //use mountpath for WS server
const customConfig = Object.assign(Object.assign({}, config), { path: path_1.default.join(app.path(), options.path, '/') }); const customConfig = Object.assign(Object.assign({}, config), { path: path_1.default.posix.join(app.path(), options.path, '/') });
const wss = new webSocketServer_1.WebSocketServer({ const wss = new webSocketServer_1.WebSocketServer({
server, server,
realm, realm,

View File

@ -34,7 +34,7 @@ export const createInstance = ({ app, server, options }: {
app.use(options.path, api); app.use(options.path, api);
//use mountpath for WS server //use mountpath for WS server
const customConfig = { ...config, path: path.join(app.path(), options.path, '/') }; const customConfig = { ...config, path: path.posix.join(app.path(), options.path, '/') };
const wss: IWebSocketServer = new WebSocketServer({ const wss: IWebSocketServer = new WebSocketServer({
server, server,