Add a CLI option to specify the host (#3180)

This commit is contained in:
Kulshekhar Kabra
2016-12-05 19:20:46 +05:30
committed by Florent Vilmart
parent df74a1f8ae
commit 8124bf4600
2 changed files with 6 additions and 1 deletions

View File

@@ -26,6 +26,11 @@ export default {
default: 1337,
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": {
env: "PARSE_SERVER_DATABASE_URI",
help: "The full URI to your mongodb database"

View File

@@ -35,7 +35,7 @@ function startServer(options, callback) {
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);
if (options.startLiveQueryServer || options.liveQueryServerOptions) {