あなたParseServerを設定する場合、RedisのサーバーのURLが含まれており、あなたはライブクエリを有効にするクラス名を設定するオプションがあります:
liveQuery: {
classNames: ['_User', 'Map'],
redisURL: 'redis://localhost:6379'
}
全設定:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://IP:PORT/PATH',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'AppID',
masterKey: process.env.MASTER_KEY || 'MasterKey', //Add your master key here. Keep it secret!
//javascriptKey: process.env.JAVASCRIPT_KEY || '',
serverURL: process.env.SERVER_URL || 'http://IP:PORT/parse', // Don't forget to change to https if needed
liveQuery: {
classNames: ['ExampleClass'], // Add Class names here
redisURL: 'redis://REDIS_IP:REDIS_PORT'
},
});
var app = express();
var port = process.env.PORT || 1111;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
console.log('App on port ' + port + '.');
});
// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer, {
redisURL: 'redis://REDIS_IP:REDIS_PORT'
});