1

I am having trouble connecting to the LiveQuery server that I setup on the server side of my React Native project. I followed the instructions on the site verbatim, but can only manage to get 'error on socket' when I connect with numerous attempts by the server to reconnect.

Here is my server setup:

liveQuery: {
        classNames: ['BekonRequest'],
    } 
var port = 1337;

server.listen(port, function() {
    console.log('parse-server running on port ' + port); }); 
    var parseLiveQueryServer = ParseServer.createLiveQueryServer(server); 

server.listen(port, function() {
console.log('parse-server running on port ' + port);
});  

var parseLiveQueryServer = ParseServer.createLiveQueryServer(server);

And my client side code:

let requestQuery = new Parse.Query('BekonRequest');
    requestQuery.equalTo("username", "broncos@nfl.com");
    let subscription = requestQuery.subscribe();

    subscription.on('create', (requests) => {
        console.log(requests);
    });

Can anyone see why I am not able to connect successfully?

Dana White
  • 81
  • 2
  • 5

0 Answers0