You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully integrated socket.io at index.js and able to receive messages through the socket connection.
How to pass the data from socket message to parse server cloud function cloud/main.js function messageFromSocket(message);
index.js
//Parse Server Initializationvarapi=newParseServer({databaseURI: databaseUri,
......
});//SocketIOvarapp=require('express')();varserver=require('http').createServer(app);vario=require('socket.io')(server);io.on('connection',function(){/* … */});server.listen(3000);global._io=require('socket.io')(httpServer);_io.on('connection',(socket)=>{console.log('Client connected');//Send Message to Emittersocket.on('message',function(data,fun){console.log("Message Received");//Send this message to parse server cloud function fun("success");});}
cloud/main.js
functionreceivedMessageFromSocket(message){//Then this will be saved to data base}
The text was updated successfully, but these errors were encountered:
I have successfully integrated socket.io at index.js and able to receive messages through the socket connection.
How to pass the data from socket message to parse server cloud function
cloud/main.js function messageFromSocket(message);
index.js
cloud/main.js
The text was updated successfully, but these errors were encountered: