API configuration

The API is configurured trought either environment variables or a local config file /config/local.js

Server settings

Basic server settings

API_URL
API_HOSTNAME
API_EXPRESS_PORT
API_EMAILADDRESS
  "url": "",
  "hostname": "",
  "emailAddress": "",
  "express": {
    "port": 0
  },

Database

MySQL database access

API_DATABASE_USER
API_DATABASE_PASSWORD
API_DATABASE_DATABASE
API_DATABASE_HOST
  "database": {
    "user": "",
    "password": "",
    "database": "",
    "host": "",
    "dialect": "",
    "multipleStatements": true
  },

Cookie settings

Email for notifications

The API sends emails to users and administrators. Use these settings to configure the SMTP settings

This is the address of the administrator that should receive notifications (1):

Oauth

Handling of oauth calls, and connecting to the oauth server

Ignore brute force

A list of IP's that will not be blocked by the brute force checks

Anonymize users

When anonymizing users change the names of those users to this, to be shown in ideas and arguments

Other

Fixed Auth Tokens

It is possible to allow access to the API through a fixed token. This token should be configured to represent a specific existing user. This mechanism is used to allow access to the API to other OpenStad servers (Admin panel, Frontend) but can also be used to allow access the API server to other external services or other REST tools. Fixed auth tokens are configured in either the env var API_AUTHORIZATION_FIXEDAUTHTOKENS or the local config file. It is a list of tokens and user id's:

(1) These settings are normally defined in the site config, but default to the values provided here

Last updated