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
- Error connecting Github
I have followed the documentation online for setting up VCS and cannot get my Github to properly connect in Functions. When I press the "Connect to Github" I am...
- delete cancelled site deployment
I would like to remove a cancelled site deployment, but the site menu shows only "Redeploy".
- Self-host migration from 1.8.X
Is it safe to now migrate from 1.7.4 to 1.8.X on my selfhost?