Minecraft server runner
This repository has been archived on 2024-04-15. You can view files and clone it, but cannot push or open issues or pull requests.
2024-01-17 21:54:28 -03:00
src Initial commit 2024-01-17 21:54:28 -03:00
.gitignore Initial commit 2024-01-17 21:54:28 -03:00
LICENSE Initial commit 2024-01-17 21:54:28 -03:00
package-lock.json Initial commit 2024-01-17 21:54:28 -03:00
package.json Initial commit 2024-01-17 21:54:28 -03:00
README.md Initial commit 2024-01-17 21:54:28 -03:00
tsconfig.json Initial commit 2024-01-17 21:54:28 -03:00

Minecraft server Runner

This is a simple runner for you to run your servers remotely, it quickly just receives the commands and synchronizes with the Server that manages the requests, separating some functions that can be completely independent.

Paths request's

  • POST /register

    Register runner in server, and return runnerID

    body:

    {
      "token": "" // Runner token
    }
    
    • OK:

      {
        "runnerID": "${string}_${string}_${string}_${string}", // Unique Runner ID
      }
      
    • Fail:

      Responde code: !200 (Any, non 200).

  • GET /acts/{runnerID}

    Get activitys to run in runner and return status

    [
      {
        "type": 0, // Activity type, Check types in "/src/runner.ts".
        "id": 0, // Activity ID.
        "serverUUID": "", // Server UUID to server action, if create server in runner it is not necessary.
        ...
      },
      ...
    ]
    
  • POST /acts/{runnerID}

    Register activity status.

    • OK:

      {
        "id": 0, // Activity id.
      }
      
    • Fail:

      {
        "id": 0, // Activity id.
        "errors": [
          {
            "message": "", // Message error
            "stack": [ "", null ] // string or undefined
          },
          ...
        ]
      }
      

Log path

Web socket (prefer)

  • SOCKET /log/{sessionID}

    Get Socket connection to send stdout|stderr and write stdin in server.

Loop fetch

  • PUT /log/{sessionID}/{stdout|stderr}

    Log server chuck log

    Body: binary|text

  • GET /log/{sessionID}/stdin

    Loop fetch binary or text to write in server stdin