# ERROR WebSocket connection to 'ws://localhost:3001/red/comms' failed:

**URL:** <https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507>\
**Category:** General\
**Created:** [30 June 2023 16:10 UTC](https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507 "2023-06-30T16:10:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ax2382](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ax2382/32/81010_2.png) [@ax2382](https://discourse.nodered.org/u/ax2382)\
**Post date:** [30 June 2023 16:10 UTC](https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507/1 "2023-06-30T16:10:07Z")

</div>

I have just embedded node-red in a Node.js web app with all default settings and I am getting this web browser error:

`ERROR WebSocket connection to 'ws://localhost:3001/red/comms' failed`

Clearly, I have not created an endpoint at `/red/comms` but my question is, once I create this WS endpoint, what should it do? is there documentation for this or perhaps complete embedding installation Guide?

Thank you!

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [30 June 2023 17:48 UTC](https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507/2 "2023-06-30T17:48:55Z")

</div>

> [@ax2382](#):
>
> once I create this WS endpoint, what should it do?

Send a payload to it.

---

<div class="post-metadata">

**Author:** ![ax2382](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ax2382/32/81010_2.png) [@ax2382](https://discourse.nodered.org/u/ax2382)\
**Post date:** [30 June 2023 17:55 UTC](https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507/3 "2023-06-30T17:55:19Z")

</div>

LOL! hahaha yes I know... what I meant is, I receive whatever payload comes in but then what am I supposed to do with the payload and WHY is it sending WS requests there? what's the purpose?

Ideally, there could be a complete guide on embedding? otherwise I'll be asking questions again and again... thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 August 2023 17:55 UTC](https://discourse.nodered.org/t/error-websocket-connection-to-ws-localhost-3001-red-comms-failed/79507/4 "2023-08-29T17:55:56Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
