Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/cli/definitions/parse-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default {
help: "Run with cluster, optionally set the number of processes default to os.cpus().length",
action: numberOrBoolParser("cluster")
},
"liveQuery.classNames": {
"liveQuery": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was it classNames? did that even work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope that didn't :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was a duplicate of the next one, that would let you pass --liveQuery.classNames options easily

help: "parse-server's LiveQuery configuration object",
action: objectParser
},
Expand All @@ -214,6 +214,10 @@ export default {
help: "Starts the liveQuery server",
action: booleanParser
},
"liveQueryPort": {
help: 'Specific port to start the live query server',
action: numberParser("liveQueryPort")
},
"liveQueryServerOptions": {
help: "Live query server configuration options (will start the liveQuery server)",
action: objectParser
Expand Down
8 changes: 7 additions & 1 deletion src/cli/parse-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down