Skip to content
On this page

Configuration

You can easly configure highscore using environnement variables. These are all current variables you can update to configure your highscore instance like you want.

Global

VariableDescriptionTypeDefault
HIGHSCORE_PORTDefine port of the appnumber8081
HIGHSCORE_DB_URLDefine mongodb urlstring
HIGHSCORE_SESSION_SECRETSecret used for the express-sessionstring

Customization

These options allow you to customize the default website.

VariableDescriptionTypeDefault
HIGHSCORE_TITLEHome page titlestringHighScore
HIGHSCORE_DESCRIPTIONHome page descriptionstringOpen Source leaderboard
HIGHSCORE_LOGO_URLHome page logo urlstring/logo.png
HIGHSCORE_FAVICON_URLHome page favicon urlstring/favicon.ico
HIGHSCORE_CSS_URLHome page custom css urlstring

TIP

Go to the customization section to get more information about this.

Download

These options configure the redirect for the /download endpoint depending on the user platform. If you haven't configured a platform it will use the HIGHSCORE_DOWNLOAD_URL fallback url.

VariableDescriptionTypeDefault
HIGHSCORE_DOWNLOAD_URLDefault download linkstring
HIGHSCORE_WINDOWS_DOWNLOAD_URLWindows download linkstring
HIGHSCORE_LINUX_DOWNLOAD_URLLinux download linkstring
HIGHSCORE_MACOS_DOWNLOAD_URLMacos download linkstring
HIGHSCORE_ANDROID_DOWNLOAD_URLAndroid download linkstring
HIGHSCORE_IOS_DOWNLOAD_URLiOS download linkstring

Docs (swagger)

These options allow you to configure the /docs endpoint.

VariableDescriptionTypeDefault
HIGHSCORE_USERNAME_DOCSUsername for basic auth of /docs.string
HIGHSCORE_PASSWORD_DOCSPassword for basic auth of /docs.string
HIGHSCORE_DISABLE_DOCSDisable the /docs endpointbooleanfalse

Metrics

These options allow you to configure the /metrics endpoint.

VariableDescriptionTypeDefault
HIGHSCORE_USERNAME_METRICSUsername for basic auth of /metrics.string
HIGHSCORE_PASSWORD_METRICSPassword for basic auth of /metrics.string
HIGHSCORE_DISABLE_METRICSDisable the /metrics endpointbooleanfalse

Bad words

This option allow you to configure the bad words filter. If you want add more filter to the bad words list update the config/ban.json file.

VariableDescriptionTypeDefault
HIGHSCORE_DISABLE_BAD_WORDSDisable the bad words filterbooleanfalse

Rate limit

This option add a request rate limit to each endpoint of the application.

VariableDescriptionTypeDefault
HIGHSCORE_RATE_LIMIT_MINUTEDefine the time for the rate limit in minutenumber60
HIGHSCORE_RATE_LIMIT_NUMBERNumber of request limitnumber1000
HIGHSCORE_DISABLE_RATE_LIMITDisable the rate limitbooleanfalse

Privacy policy

This option allow you to configure the privacy page with your own information.

VariableDescriptionTypeDefault
HIGHSCORE_PRIVACY_EMAILYour email address for the privacy policystring
HIGHSCORE_PRIVACY_WEBSITEYour website address for the privacy policystring
HIGHSCORE_PRIVACY_COUNTRYYour countrystring

Released under the MIT License.