screepsmod-client-new
v0.2.10
Published
Screeps server mod that serves the screeps-client at /client and connects it to the same server.
Readme
screeps-mod-client
Screeps private-server mod that serves screeps-client at /client on the same server it runs on. The client connects to its own origin, so no separate hosting or CORS setup is required.
Install
Add the package to your server's mods.json:
{
"mods": [
"node_modules/screeps-mod-client"
]
}Configuration
Two layers, in order of precedence:
- Environment variables (highest)
modConfig.clientinmods.json- Defaults
| Setting | ENV | modConfig.client.* | Default |
| --- | --- | --- | --- |
| Mount path | SCREEPS_MOD_CLIENT_MOUNT_PATH | mountPath | /client |
| Redirect / → mount path | SCREEPS_MOD_CLIENT_ROOT_REDIRECT | rootRedirect | true |
Docker example
docker run -e SCREEPS_MOD_CLIENT_MOUNT_PATH=/play \
-e SCREEPS_MOD_CLIENT_ROOT_REDIRECT=false \
screeps/private-serverHow it works
The mod resolves the client bundle from its screeps-client dependency at runtime — no separate build step is needed. The bundle is built with base=/client/, so the mount path must match.
