LiveQuery options cannot be set via env variables, although it is listed in the definition file, the parse-server cli it not picking it up.
In https://github.com/parse-community/parse-server/blob/master/src/cli/definitions/parse-server.js, it's only reading ParseServerOptions.
Run PARSE_SERVER_START_LIVE_QUERY_SERVER=1 PARSE_SERVER_LIVEQUERY_CLASSNAMES=GameScore parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test
The classNames are listed among the other options when starting parse server initially.
The classNames are NOT listed among the other options when starting parse server initially.
Server
Database
Using env var
appId: APPLICATION_ID
masterKey: ***REDACTED***
masterKeyIps: []
logsFolder: ./logs
databaseURI: mongodb://localhost/test
userSensitiveFields: ["email"]
enableAnonymousUsers: true
allowClientClassCreation: true
maxUploadSize: 20mb
customPages: {}
sessionLength: 31536000
expireInactiveSessions: true
revokeSessionOnPasswordReset: true
schemaCacheTTL: 5000
cacheTTL: 5000
cacheMaxSize: 10000
objectIdSize: 10
port: 1337
host: 0.0.0.0
mountPath: /parse
startLiveQueryServer: true
scheduledPush: false
collectionPrefix:
verifyUserEmails: false
preventLoginWithUnverifiedEmail: false
enableSingleSchemaCache: false
jsonLogs: false
verbose: false
level: undefined
serverURL: http://localhost:1337/parse
[29903] parse-server running on http://localhost:1337/parse
Using config file
appId: APPLICATION_ID
masterKey: ***REDACTED***
masterKeyIps: []
logsFolder: ./logs
databaseURI: mongodb://localhost/test
userSensitiveFields: ["email"]
enableAnonymousUsers: true
allowClientClassCreation: true
maxUploadSize: 20mb
customPages: {}
liveQuery: {"classNames":["GameScore"]}
sessionLength: 31536000
expireInactiveSessions: true
revokeSessionOnPasswordReset: true
schemaCacheTTL: 5000
cacheTTL: 5000
cacheMaxSize: 10000
objectIdSize: 10
port: 1337
host: 0.0.0.0
mountPath: /parse
startLiveQueryServer: true
scheduledPush: false
collectionPrefix:
verifyUserEmails: false
preventLoginWithUnverifiedEmail: false
enableSingleSchemaCache: false
jsonLogs: false
verbose: false
level: undefined
serverURL: http://localhost:1337/parse
[29903] parse-server running on http://localhost:1337/parse
You can use the PARSE_SERVER_LIVE_QUERY environment variable which expects a JSON serialized object. Did you expect to use the same environment variables as the standalone live query server? This could make sense
I didn't realise those are for the standalone server and the usage of PARSE_SERVER_LIVE_QUERY
I'll send in a PR for the documentation, tho using the same environment variables sounds good too. Any way I can help?
That would be very nice to use the same environment variables and treat the ‘start live query server’ the same way both ways (stand-alone and with server)
you can check my Parse Server Live Query repo to see how to pass LiveQuery env variable to docker run command or docker-compose.
Most helpful comment
you can check my Parse Server Live Query repo to see how to pass LiveQuery env variable to docker run command or docker-compose.