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

Should not connect to non-existing ws API #157

Open
wll8 opened this issue May 19, 2022 · 1 comment
Open

Should not connect to non-existing ws API #157

wll8 opened this issue May 19, 2022 · 1 comment

Comments

@wll8
Copy link

wll8 commented May 19, 2022

code

const express = require(`express`)
const server = express()
require(`express-ws`)(server)
server.ws(`/xxx`, (ws, req) => {
  console.log(`socket`, req.testing)
  ws.on(`message`, function(msg) {
    console.log(msg)
  })
})
server.listen(3040)

test

Should not connect to non-existing ws API

new WebSocket(`ws://127.0.0.1:3040/1/2/3`)
@wll8
Copy link
Author

wll8 commented May 19, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant