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
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...