Add install instructions

This commit is contained in:
Michael Morrison 2013-07-10 07:23:18 -05:00
parent 27b09c37e4
commit 081e7d44bd

View file

@ -4,16 +4,22 @@ node-GameDig - Game Server Query Library
Usage Usage
--- ---
```bash
npm install gamedig
```
```javascript ```javascript
var Gamedig = require('gamedig'); var Gamedig = require('gamedig');
Gamedig.query({ Gamedig.query(
{
type: 'minecraft', type: 'minecraft',
host: 'mc.example.com', host: 'mc.example.com'
callback: function(state) { },
function(state) {
if(state.error) console.log("Server is offline"); if(state.error) console.log("Server is offline");
else console.log(state); else console.log(state);
} }
}); );
``` ```
State Object State Object