Adds ability to run livequery server on different port (appengine) (#2892)

* Adds ability to run livequery server on different port (appengine)
This commit is contained in:
Florent Vilmart
2016-10-19 20:11:25 -04:00
committed by Arthur Cinader
parent 86f35014f4
commit 5dc24334a5
2 changed files with 12 additions and 2 deletions

View File

@@ -35,7 +35,13 @@ function startServer(options, callback) {
var server = app.listen(options.port, callback);
if (options.startLiveQueryServer || options.liveQueryServerOptions) {
ParseServer.createLiveQueryServer(server, options.liveQueryServerOptions);
let liveQueryServer = server;
if (options.liveQueryPort) {
liveQueryServer = express().listen(options.liveQueryPort, () => {
console.log('ParseLiveQuery listening on ' + options.liveQueryPort);
});
}
ParseServer.createLiveQueryServer(liveQueryServer, options.liveQueryServerOptions);
}
var handleShutdown = function() {
console.log('Termination signal received. Shutting down.');