Skip to content

Commit 2da5a1c

Browse files
authored
Merge pull request #155 from moritzbrantner/master
Add full name arguments
2 parents bf336d1 + 349f38b commit 2da5a1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Start the GraphQL server on localhost, port 3000.
4646
json-graphql-server db.js
4747
```
4848

49-
To use a port other than 3000, you can run `json-graphql-server db.js --p <your port here>`
50-
To use a host other than localhost, you can run `json-graphql-server db.js --h <your host here>`
49+
To use a port other than 3000, you can run `json-graphql-server db.js -p <your port here>` or `--port <your port here>`
50+
To use a host other than localhost, you can run `json-graphql-server db.js -h <your host here>` or `--host <your host here>`
5151

5252
Now you can query your data in graphql. For instance, to issue the following query:
5353

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' && 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' && 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)