This monorepo contains the Splix client code, server code, as well as code related to server management.
- To download the executable, head over to releases and download the latest release for your platform.
- Unarchive the .tar file.
- You can run
splixGameServer --help
from the command line for an overview of arguments, but depending on your platform, you might be able to double click the downloaded file to start the server as well.
If everything went as expected, you should see Listening on: ws://localhost:8080
.
You can now connect to the server by visiting https://splix.io/#ip=ws://localhost:8080
Hosting your own server is beyond the scope of this documentation. There are many different cloud providers, each with their own pros and cons. The official splix server is hosted on a DigitalOcean droplet. It uses a nginx proxy in combination with certificates from Let's Encrypt.
As an example, adding the following to your server
block in your nginx configuration
will forward requests to yourdomain.com/ws to the splix gameserver.
location ~* /(ws)$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://localhost:8080;
proxy_read_timeout 90;
}
If you want to make changes to the code, you can run the server in a development environment.
- Install Deno 1.37.0
- Either install Deno normally and run
deno upgrade --version=1.37.0
- Or install Deno Version Manager and run
dvm use
after cloning. Deno Version Manager will then use the .dvmrc file of this repository to determine which version to use.
- Either install Deno normally and run
- Clone this repository
cd
into the cloned repository and rundeno task dev
This will start a local server, with several endpoints. Visit https://localhost:8080 for a list of endpoints.