Add a CLI option to specify the host (#3180)
This commit is contained in:
committed by
Florent Vilmart
parent
df74a1f8ae
commit
8124bf4600
@@ -26,6 +26,11 @@ export default {
|
|||||||
default: 1337,
|
default: 1337,
|
||||||
action: numberParser("port")
|
action: numberParser("port")
|
||||||
},
|
},
|
||||||
|
"host": {
|
||||||
|
env: "PARSE_SERVER_HOST",
|
||||||
|
help: "The host to serve ParseServer on. defaults to 0.0.0.0",
|
||||||
|
default: '0.0.0.0',
|
||||||
|
},
|
||||||
"databaseURI": {
|
"databaseURI": {
|
||||||
env: "PARSE_SERVER_DATABASE_URI",
|
env: "PARSE_SERVER_DATABASE_URI",
|
||||||
help: "The full URI to your mongodb database"
|
help: "The full URI to your mongodb database"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ function startServer(options, callback) {
|
|||||||
|
|
||||||
app.use(options.mountPath, api);
|
app.use(options.mountPath, api);
|
||||||
|
|
||||||
let server = app.listen(options.port, callback);
|
let server = app.listen(options.port, options.host, callback);
|
||||||
server.on('connection', initializeConnections);
|
server.on('connection', initializeConnections);
|
||||||
|
|
||||||
if (options.startLiveQueryServer || options.liveQueryServerOptions) {
|
if (options.startLiveQueryServer || options.liveQueryServerOptions) {
|
||||||
|
|||||||
Reference in New Issue
Block a user