Git Product home page Git Product logo

serverstarter's Introduction

ServerStarter is used to allow friends to start up servers in your pc without you having to always start up / close the servers manually.

You need to open up port 54629 which is used in main.js.

If the game needs an plugin and you create it make the plugin just create an http server which takes post requests and executes the command received. The plugins themselfs can be localhost and thats the way i do it.

JSON Structure for userServers.json

The userServers.json file stores information about user servers configurations.

{
    "User1": {
        "Terraria": {
            "path": "C:/Gaming/Servers/User1/M68/Terraria/TShock-5.2.exe", 
            "args": "-port 22657 -maxplayers 8 -world C:/Gaming/Save-files/Terraria/Worlds/world1.wld",
            "PluginNeeded": true,
            "PluginUrl": "http://localhost:53267/Terraria/CommandExecution",
            "CloseCommand": "exit"
        },
        "Hexxit": {
            "path": "C:/Gaming/Servers/User1/Minecraft/Hexxit/LaunchServer.bat", 
            "CloseCommand": "stop"
        },
        "passKey": "passwordForUser1",
        "Loc": "GR"
    },
    "User2": {
        "ATM9": {
            "path": "C:/Gaming/Servers/User2/Minecraft/ATM9/LaunchServer.bat", 
            "CloseCommand": "stop"
        },
        "passKey": "passwordForUser2",
        "Loc": "FI"
    }
}

Explanation of Fields:

  • User1 and User2 - Usernames. There can be multiple servers per user.

  • Terraria and Hexxit or ATM9 - Names of the servers associated with the respective users.

    • path: The file path to the server executable or script.

    • args: Arguments to be passed to the server executable. (Optional)

    • PluginNeeded: Indicates whether a plugin is required for the server (true) (Optional)

    • PluginUrl: HTTP Server that the plugin creates which the serverManager.js then connects into for communication (Only required if PluginNeeded is true)

    • CloseCommand: Command to stop the server gracefully.

    • passKey: Authentication key for accessing the server.

    • Loc: Location of the user for authentication.

Dependencies.

Python

  • pip install requests

NodeJS

  • npm install express
  • npm install axios

Tested

  • NodeJS v20.5.1
  • Python 3.11.4

serverstarter's People

Contributors

sandelier avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.