* Helper method to create a liveQuery server * @static * @param {Server} httpServer an optional http server to pass * @param {LiveQueryServerOptions} config options for the liveQueryServer * @param {ParseServerOptions} options options for the ParseServer * @returns {Promise<ParseLiveQ
(
httpServer,
config: LiveQueryServerOptions,
options: ParseServerOptions
)
| 515 | * @returns {Promise<ParseLiveQueryServer>} the live query server instance |
| 516 | */ |
| 517 | static async createLiveQueryServer( |
| 518 | httpServer, |
| 519 | config: LiveQueryServerOptions, |
| 520 | options: ParseServerOptions |
| 521 | ): Promise<ParseLiveQueryServer> { |
| 522 | if (!httpServer || (config && config.port)) { |
| 523 | var app = express(); |
| 524 | httpServer = require('http').createServer(app); |
| 525 | httpServer.listen(config.port); |
| 526 | } |
| 527 | const server = new ParseLiveQueryServer(httpServer, config, options); |
| 528 | await server.connect(); |
| 529 | return server; |
| 530 | } |
| 531 | |
| 532 | static async verifyServerUrl() { |
| 533 | // perform a health check on the serverURL value |