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
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- Urgent help required - Could not resolve...
I upgraded my production environment to 1.8.0 but experienced issues with appwrite running out of worker threads. I downgraded back to 1.6.1 and restored the da...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...