Skip to content

Commit 9a82ed9

Browse files
Enable --host and --port as CLI params for custom host and port. README instructions were originally not working
1 parent 2da5a1c commit 9a82ed9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/json-graphql-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ var app = express();
1313

1414
process.argv.forEach((arg, index) => {
1515
// allow a custom port via CLI
16-
if ((arg === '-p' || arg === '--port') && process.argv.length > index + 1) {
16+
if ((arg === '--p' || arg === '--port') && process.argv.length > index + 1) {
1717
PORT = process.argv[index + 1];
1818
}
1919

20-
if ((arg === '--h'|| arg === '--host') && process.argv.length > index + 1) {
20+
if ((arg === '--h' || arg === '--host') && process.argv.length > index + 1) {
2121
HOST = process.argv[index + 1];
2222
}
2323
});

0 commit comments

Comments
 (0)