Development setup¶
Simply follow the instructions to run Relay from source, on your own fork.
Before submitting any change, make sure to:
- Run
npm testto execute linters and the test suite- Run
npm run format:prettierif linting fails
- Run
- Run
go test ./cmd/... ./internal/...andgo vet ./cmd/... ./internal/...if you change anything incmd/orinternal/ - Run
npm run build:clientif you change or add anything inclient/jsorclient/components- The built files will be output to
public/by Vite
- The built files will be output to
For local development, run two terminals:
npm run watchrebuildspublic/whenever client files changego run ./cmd/relay start --devruns the server against those rebuilt assets
The --dev flag relaxes the CSP so local client rebuilds can load correctly. There is no backend hot reloading, so restart the Go process after server-side changes.
If you want a throwaway local test environment with an isolated Relay data directory, you can use a temporary RELAY_HOME:
TMP_RELAY_HOME="$(mktemp -d /tmp/relay-dev.999999)"
npm run build:client
RELAY_HOME="$TMP_RELAY_HOME" go run ./cmd/relay start --dev
This is handy when you want to test a fresh local instance without touching your normal Relay data.
To ensure that you don't commit files that fail linting, you can install a pre-commit git hook. Execute npm run githooks-install to do so.
Responsible Disclosure of Security Vulnerabilities¶
- Do not open public issues to report security vulnerabilities.
- Contact us privately first, in a responsible disclosure manner.
- On IRC, send a private message to any voiced user in
#relayonirc.ouch.chat. - By email, send your report to security@zrgameworks.com.