Skip to content

Commit

Permalink
preflightCheck examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MBR-0001 committed Dec 31, 2020
1 parent 9528b71 commit b3adc88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ query.getPlayers().then(players => console.log('Online Players:', players));
query.getRules().then(rules => console.log('Server Rules:', rules));
//if autoclose is false this method has to be called to stop the query from preventing the process from exiting
query.close();


//in case you only want to check if the server is "alive" you can do the following
SourceQuery.preflightCheck('127.0.0.1', 28015).then(() => console.log("server is alive!")).catch(() => console.log("server is down!"));
```

## Supported Games
Expand Down

0 comments on commit b3adc88

Please sign in to comment.