How to connect front/back? #1730
-
So, I am trying to connect my front and back end right now but this Is my first time dealing with something like this and I don't really know where to begin. Current I have a C++ file that looks like this and will act as my "backend"
Then I have a front end that does this on a button click: `import React from "react"; function GameRoom() {
My front end console just logs me "bad response from server" disconnected message. Am I doing any of this correctly? I just want like an output in my backend saying like hey we have a connection. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Use the EchoServer.cpp example for WebSockets instead of (what seems like) HelloWorld.cpp. EchoServer.cpp will work for your test |
Beta Was this translation helpful? Give feedback.
Use the EchoServer.cpp example for WebSockets instead of (what seems like) HelloWorld.cpp. EchoServer.cpp will work for your test