File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const fetchMessages = async ( ) => {
2- const url = "http ://localhost:3000 /messages"
2+ const url = "https ://pp3psp4mxrlip4uxvmeb9cmv.hosting.codeyourfuture.io /messages"
33
44 try {
55 const response = await fetch ( url ) ;
@@ -49,7 +49,7 @@ const sendMessage = async () => {
4949 const name = document . getElementById ( "user" ) . value . trim ( )
5050 const msg = document . getElementById ( "msg" ) . value . trim ( )
5151
52- const url = "http ://localhost:3000 /message"
52+ const url = "https ://pp3psp4mxrlip4uxvmeb9cmv.hosting.codeyourfuture.io /message"
5353
5454 const res = await fetch ( url , {
5555 method : "POST" ,
@@ -86,8 +86,8 @@ const showError = (msg) => {
8686 errorEl . style . color = "red" ;
8787} ;
8888
89- const ws = new WebSocket ( "ws://localhost:3000" ) ;
90-
89+ const ws = new
90+ WebSocket ( "wss://pp3psp4mxrlip4uxvmeb9cmv.hosting.codeyourfuture.io" ) ;
9191ws . onmessage = ( event ) => {
9292 const data = JSON . parse ( event . data ) ;
9393
You can’t perform that action at this time.
0 commit comments