mock-socket icon indicating copy to clipboard operation
mock-socket copied to clipboard

Listen on multiple routes

Open edi9999 opened this issue 6 years ago • 1 comments

Currently I think it is only possible to listen on one ws url.

For example :

const ws = new WebServer('/path')

I personally want to listen to multiple paths, but without changing the server itself.

This could be achieved with regexes, for example :

const ws = new WebServer(/(\/path|\/otherpath)/)

edi9999 avatar Mar 06 '19 14:03 edi9999

Good idea: We have a scenario where we connect to the same server with different sets of query parameters. Cannot do this atm with mock-socket. See also #215.

sechel avatar Jul 19 '19 13:07 sechel