I have a parse server running on digital ocean connected with my quasar framework.
Im trying to get my livequerys to work on my parse server. This is what I have done:
-
ssh into digital ocean and added the class for the livequery in mine docker file:
- PARSE_SERVER_LIVE_QUERY={"classNames":["MyClass"]}
-
Init the subscription in created as below. Subscription prints at opening as it should but when I manually edit something in my parseserver nothing prints in the console. I expected it should print every time something changes in the database.
created: function() {
this.initSubscription();
},
methods: {
initSubscription: async function() {
const MyClass= parse.Object.extend("MyClass");
const query = new parse.Query(MyClass);
// do a bit of filtering so only display row where the column "myColumn" matches "thisValue"
query.equalTo("myColumn", "thisValue");
// create a subscription
let subscription= await query.subscribe();
// THIS PRINTS
subscription.on("open", () => {
console.log("subscription opened");
});
// BUT NONE OF THESE WORKS WHEN MANUALLY CHANGING IN DATABASE
subscription.on("create", object => {
console.log("object created", object);
});
subscription.on("update", object => {
console.log("object updated", object);
});
subscription.on("enter", object => {
console.log("object entered", object);
});
},
What am I doing wrong?
I had this guide as reference