Explorar o código

fix for #170 windows paths

Robert Rößger %!s(int64=5) %!d(string=hai) anos
pai
achega
a72e4fc60e
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      dist/src/instance.js
  2. 1 1
      src/instance.ts

+ 1 - 1
dist/src/instance.js

@@ -25,7 +25,7 @@ exports.createInstance = ({ app, server, options }) => {
     });
     app.use(options.path, api);
     //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({
         server,
         realm,

+ 1 - 1
src/instance.ts

@@ -34,7 +34,7 @@ export const createInstance = ({ app, server, options }: {
   app.use(options.path, api);
 
   //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({
     server,