dherault / dherault/serverless-offline

Not able to connect serverless-offline websocket on browser

Open
#1,670 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.3k
Forks
811
Avg merge
2d 4h
Merged PRs (30d)
3

Description

I have a node project and I have created websocket with serverless and it's running on port 6000.
When I try to connect from wscat it's able to connect

wscat -c ws://localhost:6000.

But when I try to connect from browser using Websocket browser api it fails to connect the connect request is not even reaching the lambda function
On browser I am using

new WebSocket('ws://localhost:6000')
Browser just throws error connection failed with no reason.

When I deploy cloud formation file to aws that websocket I am able to connect

Please help if I am missing anything.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.