Skip to content

Commit 8124bf4

Browse files
kulshekharflovilmart
authored andcommitted
Add a CLI option to specify the host (#3180)
1 parent df74a1f commit 8124bf4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/cli/definitions/parse-server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export default {
2626
default: 1337,
2727
action: numberParser("port")
2828
},
29+
"host": {
30+
env: "PARSE_SERVER_HOST",
31+
help: "The host to serve ParseServer on. defaults to 0.0.0.0",
32+
default: '0.0.0.0',
33+
},
2934
"databaseURI": {
3035
env: "PARSE_SERVER_DATABASE_URI",
3136
help: "The full URI to your mongodb database"

src/cli/parse-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function startServer(options, callback) {
3535

3636
app.use(options.mountPath, api);
3737

38-
let server = app.listen(options.port, callback);
38+
let server = app.listen(options.port, options.host, callback);
3939
server.on('connection', initializeConnections);
4040

4141
if (options.startLiveQueryServer || options.liveQueryServerOptions) {

0 commit comments

Comments
 (0)