Hi,
I set up my liveQuery server like this:
const port = process.env.PORT || 3001;
httpServer.listen(port, () => {
console.log(`Server running on port ${port}.`);
});
ParseServer.createLiveQueryServer(httpServer);
And my client code like this:
async function subscribeToTTI() {
const query = new Parse.Query("TextToImage");
const subscription = await query.subscribe();
subscription.on("open", () => {
console.log("Connected...")
});
}
useEffect(() => {
subscribeToTTI();
}, [])
In the server logs I can see that client is connected:
info: Create new client: bae5431c-3d45-4529-be74-4fec3b03f25e
But on the client side I’m getting this error and the subscription is not working:
TypeError: Cannot read properties of undefined (reading 'socket')
Do you know what might be the reason? I run my parse server locally on port 3001, and my nextjs client side on port 3000.
Thank you