Client
Do this on your own computer, where your game folders live. The client is a small sync tool, the
same idea as the Sitehoster client, that pushes
your games/ definitions up to the server. It doesn't run your game; it just keeps the
server's copy of each definition in step with your filesystem.
Coming soon
Download
Grab the client: the sync script and the helpers it needs, nothing else.
unzip gamehoster-client.zip
cd gamehoster-client
# files:
# client/sync.js push your game folders to the server
# client/config.example.json config template (copy to config.json)
# shared/manifest.js change-detection + path-safety helpers
# shared/version.js the API version the client speaks
Configure it
Point the client at your server and your folder of game folders.
cp client/config.example.json client/config.json
# apiBase: "https://<your-server-ip>"
# apiToken: "<token from the installer>"
# contentRoot: "./games"
Sync
The first run uploads every definition; each later run pushes only what changed. The games root's
children are domains; a game folder pong/ inside a domain game.example.com/
goes live at wss://game.example.com/pong.
node client/sync.js
Keep it in sync
Schedule it, or let the client loop itself while you're working on a game:
node client/sync.js --watch # sync now, then every 60s until stopped
node client/sync.js --watch --interval 30 # …or choose the period (seconds)
Next steps
With a game synced, wire up its front end with the generated client library.