Hello,
Lately I've been working on a project using mosca and the http-proxy-middleware.
If you attach mosca to a server and then you mount a middleware to proxy ws requests on a specific route you'll end up with tons of errors. Because the ws server is mounted on "all the routes". If you're not aware of it, you'll spend hours trying to figure out errors like Invalid frame header.
I'd suggest 2 changes:
Set a default path for the ws entrypoint or set the path param as mandatory for the attachHttpServer(server, path).
Improve the attachHttpServer documentation, with the mandatory path argument.
Hello, Lately I've been working on a project using mosca and the http-proxy-middleware.
If you attach mosca to a server and then you mount a middleware to proxy
ws
requests on a specific route you'll end up with tons of errors. Because thews
server is mounted on "all the routes". If you're not aware of it, you'll spend hours trying to figure out errors likeInvalid frame header
.I'd suggest 2 changes:
Set a default
path
for the ws entrypoint or set thepath
param as mandatory for theattachHttpServer(server, path)
.Improve the attachHttpServer documentation, with the mandatory
path
argument.