You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an app.supabase.io hosted API URL for the process.env.REALTIME_URL variable.
Expected behavior
The socket should connect successfully.
System information
OS: Windows 10
Browser (if applies) N/A
Version of realtime-js: 1.0.6
Version of Node.js: 14.15.0
Additional context
I'm assuming that if we're using app.supabase.io to host our DB and API, we should be able to use that to connect the realtime-js client to rather than self hosting the realtime API using docker as explained in the examples?
The text was updated successfully, but these errors were encountered:
@sturatcliffe I think the Node example requires you to run the Realtime server locally by following the instructions here: https://github.com/supabase/realtime#server-set-up. It'll run on port 4000 by default so you don't need to pass in REALTIME_URL env var.
app.supabase.io points to the hosted version of your projects on Supabase which makes it easy for you to watch and get notifications for db changes without having to interface with supabase/realtime and supbase/realtime-js directly. You can refer to the documentation here: https://supabase.io/docs/client/initializing and https://supabase.io/docs/client/subscribe to get started.
@w3b6x9 ah OK - I couldn't find any confirmation anywhere but I was guessing the realtime server was bundled in with the hosting on app.supabase.io.
I first tried listening for updates using the supabase-js client from a node server, as it's isomorphic so I wondered if that would work, but I couldn't seem to get it to listen for updates in realtime. Fetching data on the server was fine, but realtime updates didn't seem to fire.
However, I've just tried again and got it working......it helps if you actually add the .subscribe() call which I evidently forgot the first time!
Apologies for this issue, and thank you for your help.
Bug report
Describe the bug
When following the node example in this repo, I'm receiving the following error on the
socket.connect()
line:"TypeError: Socket is not a constructor"
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Follow the example here:
https://github.com/supabase/realtime/blob/master/examples/node-js/src/server.js
Use an
app.supabase.io
hosted API URL for theprocess.env.REALTIME_URL
variable.Expected behavior
The socket should connect successfully.
System information
Additional context
I'm assuming that if we're using
app.supabase.io
to host our DB and API, we should be able to use that to connect therealtime-js
client to rather than self hosting the realtime API using docker as explained in the examples?The text was updated successfully, but these errors were encountered: