Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ws): mount multi ws servers on different paths #11188

Conversation

CodyTseng
Copy link
Contributor

@CodyTseng CodyTseng commented Mar 4, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

The path parameter does not work as expected. Because the path and noServer parameters can only be provided one. https://github.com/websockets/ws/blob/HEAD/doc/ws.md#new-websocketserveroptions-callback

const wsServer = this.bindErrorHandler(
new wsPackage.Server({
noServer: true,
...wsOptions,
}),
);

The wsOptions contain the path parameter.

What is the new behavior?

Multiple ws servers can be successfully mounted on different paths as described in the documentation.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

coveralls commented Mar 4, 2023

Pull Request Test Coverage Report for Build 3dcfc662-2d8e-4349-bfd2-7f9a026746ee

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.667%

Totals Coverage Status
Change from base Build f8fbebfc-ae32-4a4b-ab20-2be9b8108b43: 0.0%
Covered Lines: 6508
Relevant Lines: 7023

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit c885a89 into nestjs:master Apr 5, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants