Skip to content
New issue

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

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

Already on GitHub? # 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

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

No branches or pull requests

1 participant