Trash bin GitHub logo Information Right arrow Staticman title Staticman

Home / Documentation /

API configuration file

To get a series of configuration parameters, the application will look for a file named config.{ENVIRONMENT}.json, with {ENVIRONMENT} being the environment variable NODE_ENV where the app is running (e.g. config.development.json, config.test.json, config.production.json, etc). Alternatively, each parameter can be supplied using a corresponding environment variable. Below are the available configuration values for the Staticman API server.

See the sample config file for an example.

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.fromName

Name of sender for notification emails.

Environment variable:

EMAIL_FROM_NAME

Default:

"Staticman"

env

The application environment.

Possible values:

  • production
  • development
  • test

Environment variable:

NODE_ENV

Default:

"development"

githubAccessTokenUri

URI for the GitHub oauth provider.

Environment variable:

GITHUB_ACCESS_TOKEN_URI

Default:

"https://github.com/login/oauth/access_token'"

githubAppId

GitHub Application ID.

Environment variable:

GITHUB_APP_ID

Default:

""

githubBaseUrl

Base URL for the GitHub API.

Environment variable:

GITHUB_BASE_URL

Default:

"https://api.github.com"

githubPrivateKey

Private key for GitHub Application.

Environment variable:

GITHUB_PRIVATE_KEY

Default:

""

githubToken

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

Environment variable:

GITHUB_TOKEN

gitlabAccessTokenUri

URI for the GitLab oauth provider.

Environment variable:

GITLAB_ACCESS_TOKEN_URI

Default:

"https://gitlab.com/oauth/token"

gitlabBaseUrl

Base URL for the GitLab API.

Environment variable:

GITLAB_BASE_URL

Default:

"https://gitlab.com"

gitlabToken

Access token to the GitLab account used to push submitted content.

Environment variable:

GITLAB_TOKEN

Default:

""

onedevBaseUrl

Base URL for the OneDev API.

Environment variable:

ONEDEV_BASE_URL

Default:

"https://code.onedev.io/api"

onedevUsername

Username for the OneDev API.

Environment variable:

ONEDEV_USERNAME

Default:

""

onedevPassword

Password or Token for the OneDev API.

Environment variable:

ONEDEV_PASSWORD

Default:

""

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

Default:

""

logging.slackWebhook

Slack webhook URL to pipe log output to (NOT YET IMPLEMENTED)

Environment variable:

SLACK_WEBHOOK

Default:

""