mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Test esbuild to generate ESModule and CommonJS
This commit is contained in:
parent
46db10fcc7
commit
4764ec2e64
6 changed files with 689 additions and 7 deletions
|
|
@ -1,13 +0,0 @@
|
|||
import { GameDig } from '../lib/index.js'
|
||||
// Instead of '../lib/index.js' you would have here 'gamedig'.
|
||||
|
||||
GameDig.query({
|
||||
type: 'minecraft',
|
||||
host: 'mc.hypixel.net',
|
||||
port: 25565, // lets us explicitly specify the query port of this server
|
||||
givenPortOnly: true // the library will attempt multiple ports in order to ensure success, to avoid this pass this option
|
||||
}).then((state) => {
|
||||
console.log(state)
|
||||
}).catch((error) => {
|
||||
console.log(`Server is offline, error: ${error}`)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue