feat: add simple example

This commit is contained in:
CosminPerRam 2023-10-30 23:35:39 +02:00
parent 3a1950133d
commit 1b0930ee75
2 changed files with 13 additions and 5 deletions

11
examples/simple.js Normal file
View file

@ -0,0 +1,11 @@
import GameDig from '../lib/index.js'
// Instead of '../lib/index.js' you would have here 'gamedig'.
GameDig.query({
type: 'minecraft',
host: 'mc.hypixel.net'
}).then((state) => {
console.log(state)
}).catch((error) => {
console.log(`Server is offline, error: ${error}`)
})