Trash bin GitHub logo Information Right arrow Staticman title Staticman

Home / Documentation /

API configuration

You can run your own instance of the Staticman API. To install it, clone the repository and run npm install.

To get a series of configuration parameters, the application will look for a file named config.{ENVIRONMENT}.json, with {ENVIRONMENT} being replaced by the environment where the app is running (e.g. config.development.json). Alternatively, each parameter can be supplied using a corresponding environment variable.

akismet.site

URL of an Akismet account used for spam checking.

Example:

http://yourdomain.com

Environment variable:

AKISMET_SITE

akismet.apiKey

API key to be used with Akismet.

Environment variable:

AKISMET_API_KEY

analytics.uaTrackingId

Universal Analytics account ID.

Example:

uaTrackingId: "UA-XXXX-XX"

Environment variable:

UA_TRACKING_ID

email.apiKey

Mailgun API key to be used for email notifications. Will be overridden by a notifications.apiKey parameter in the site config, if one is set.

Environment variable:

EMAIL_API_KEY

email.domain

Domain to be used with Mailgun for email notifications. Will be overridden by a notifications.domain parameter in the site config, if one is set.

Environment variable:

EMAIL_DOMAIN

Default:

"staticman.net"

email.fromAddress

Email address to send notifications from. Will be overridden by a notifications.fromAddress parameter in the site config, if one is set.

Environment variable:

EMAIL_FROM

Default:

"[email protected]"

env

The applicaton environment.

Possible values:

  • production
  • development
  • test

Environment variable:

NODE_ENV

Default:

"development"

githubToken

Access token to the GitHub account being used to push files with.

Environment variable:

GITHUB_TOKEN

port

The port to bind the application to.

Environment variable:

PORT

Default:

0

rsaPrivateKey

RSA private key to encrypt sensitive configuration parameters with.

Example:

rsaPrivateKey: "-----BEGIN RSA PRIVATE KEY-----\nkey\n-----END RSA PRIVATE KEY-----"

Environment variable:

RSA_PRIVATE_KEY

sentryDSN

Sentry DSN

Environment variable:

SENTRY_DSN