
I'm trying to subscribe to changes in a collection but im getting ReferenceError: window is not defined
.
Here's the code i'm using
const { Client } = require("appwrite");
const client = new Client()
.setEndpoint("https://aor.rxserver.net/v1")
.setProject("gate-api");
client.subscribe("collections.gates.documents", (payload) => {
console.log(payload);
});

Currently Realtime/websocket connection are only supported in browser environments ๐

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa shet

whats your use case? ๐

I'm making a "Stargate Network" in a game called Resonite, I want to listen to changes for specific columns for when stargates are connecting to eachother so it plays the right animation in-game

It uses websockets to connect to the game itself

guess i'll just have to constantly check the state
Recommended threads
- I can't use any Oauth
Login using oauth will be rejected because the redirect url does not match but appwrite give me the redirect url is https://**************/v1/account/sessions/o...
- Getting CORS error for GraphQL query on ...
Getting CORS error when making GraphQL queries using Appwrite's SDK in Next.js (client-side). Login/signup works fine. Only GraphQL is failing on both localhost...
- coolify/appwrite ssl functions
(Sorry for m english, i'm french) Hello, i tried for 3 days to generate ssl for domain function like idfunction.appwrite.christophe-le-goff.dev. I install appwr...
