add running example

This commit is contained in:
hippoz 2022-02-11 15:22:10 +02:00
parent 2ab4277696
commit 742a46c708
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -2,6 +2,9 @@
// the Minecraft output into this script. RCON isrequired for messages to // the Minecraft output into this script. RCON isrequired for messages to
// be sent to Minecraft. // be sent to Minecraft.
// Running example - working directory: project root:
// (cd ~/minecraft_server/ ; exec ~/minecraft_server/start.sh) | RCON_PASSWORD="your rcon password" node scripts/minecraft.js
import fetch from "node-fetch"; import fetch from "node-fetch";
import { WebSocket } from "ws"; import { WebSocket } from "ws";
import Rcon from "rcon"; import Rcon from "rcon";