modulepackage
0.0.0-20250119210451-989b5b3c0ea7
Repository: https://github.com/nedik/spp-lobby.git
Documentation: pkg.go.dev
# README
Soldank++ Lobby
Soldank++ JSON API based lobby server. Enables registering and discovering all registered Soldank++ servers.
The lobby removes servers after 5 minutes unless they re-register.
Endpoints
HTTP Method | Endpoint | Returned type | Description |
---|---|---|---|
GET | /servers | List<Server> | Returns a list of all registered servers. |
GET | /servers/:ip/:port | Server | Returns information about a server specified by the given ip and port . |
GET | /servers/:ip/:port/players | List | Returns a list of players of a server specified by the given ip and port . |
POST | /servers | Empty | Registers a new server. Requires RegisterServerInput as request's body. |
Environment variables
The program expects a file app.env
to be created and filled with all the required environment variables. See example.env
Dependencies
The project uses the following packages:
- Gin Web Framework - Framework that handles http connections
- Viper - Helps define and read environment variables
- TreeMap v2 - Tree-based set data structure that helps manage the list of registered servers
Building
To build a binary run:
go build
The above command should create spp-lobby
file.
Running
Run the lobby in release mode:
GIN_MODE=release ./spp-lobby
Testing
To run all tests run command:
go test
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author