-
Notifications
You must be signed in to change notification settings - Fork 0
Waypoints
patek_cz edited this page Sep 2, 2025
·
1 revision
Backend server for Minecraft mod Raven Reloaded, providing API for synchronizing waypoints between players.
- Waypoint synchronization - Real-time sharing of waypoints between players
- REST API - Simple HTTP endpoints for waypoint management
- Automatic cleanup - Waypoints are automatically deleted after 5 minutes of inactivity
- Rate limiting - Limit of 100 requests per minute per IP address
- Caching - 1 second cache for GET requests
- Monitoring - Server status and statistics tracking
- Node.js (version 14 or higher)
- npm (Node Package Manager)
- Clone this repository
- Navigate to the
backend-serverfolder - Install dependencies:
npm installnpm run devnpm startThe server runs on port 3003. You can change the port by setting the PORT environment variable.
- Launch Minecraft with the Raven mod installed
- In the
keystrokes/config.jsonfile, set your backend server URL:
{
"backendUrl": "http://localhost:3003"
}You can also set the backend URL directly in the game using the command:
.backendurl <url>
Retrieves a list of all waypoints
Response:
[
{
"id": "playerName",
"playerName": "string",
"x": number,
"y": number,
"z": number,
"dimension": "string",
"name": "string",
"timestamp": number
}
]Creates a new waypoint or updates an existing one
Request body:
{
"playerName": "string",
"x": number,
"y": number,
"z": number,
"dimension": "string",
"name": "string"
}Deletes a specific player's waypoint
Checks server status
Response:
{
"status": "ok",
"uptime": number,
"waypointsCount": number,
"connectedClients": number,
"memoryUsage": object
}To share the server with friends, you can use ngrok, which creates a public tunnel to your local server.
- Download ngrok from ngrok.com
- Register and get an authtoken
- Set the authtoken:
ngrok config add-authtoken YOUR_AUTHTOKEN- Start the backend server:
npm start- In a new terminal, start the ngrok tunnel:
ngrok http 3003- Ngrok will display a public URL (e.g.,
https://abc123.ngrok.io)
Friends must set in the keystrokes/config.json file:
{
"backendUrl": "https://abc123.ngrok.io"
}- Ngrok URL changes with each restart (in free version)
- For permanent sharing, consider paid ngrok version or your own server
- Public tunnel is accessible to anyone with the URL
The server automatically logs:
- New client connections
- Waypoint creation/updates
- Waypoint deletions
- Automatic cleanup of expired waypoints
- Errors and rate limit events
- Set
NODE_ENV=production - Use reverse proxy (nginx) for SSL termination
- Configure firewall to restrict access
- Monitor logs to detect issues
- Check if port 3003 is free
- Verify you have the correct Node.js version
- Check URL in config.json
- Verify server is running and accessible
- Check server logs
- Wait 1 minute before next request
- Consider increasing the limit in server code
For issues and questions, you can contact moderators on Discord: https://discord.com/invite/UH7HQpWrGf