Configuration Overview

Falcon Client and Falcon Server configs work in the same way.

Falcon Client configuration can be found in the client/config directory and Falcon Server's config is found in server/config.

The config is set up use NPM Config.

Each of the config files is merged to create your applications configuration.

  • default.json
  • local.json (optional)
  • [NODE_CONFIG_ENV].json (optional)
  • custom-environment-variables.json (optional)

Config priority / order

The order in which the config files are merged is:

default.json < [NODE_CONFIG_ENV].json < local.json < custom-environment-variables.json

default.json

The default.json contains shared config that can be committed to your repository (not passwords and API keys).

[NODE_CONFIG_ENV].json

The name of this file depends on the config NODE_CONFIG_ENV. For your production environment it would be production.json and would only be loaded on that env. For this reason this file should contain environment specific config.

local.json

This file is not committed to your repository. It can contain sensitive data such as API keys and passwords you're using for your application locally.

custom-environment-variables.json

This file has the highest priority and should be used to map config to environment variables (set on your Node environment). These mapping can be used for sensitive data such as passwords that you wouldn't want committed to your repository.

If you're using Falcon Cloud you can set env variables using the dcloud CLI tool.

CLI Command

dcloud env:var <env> <name> [value]
dcloud env:var production GTM_CODE XXXXXXXXX

client/config/custom-environment-variables.json

{
"googleTagManager": {
"id": "GTM_CODE"
}
}

Ask the community. #help

If you can't find what you're looking for, the answer might be on our community slack channel. Our team keep a close eye on this and will usually get back to you within a few hours, if not straight away. If you haven't created an account yet please sign up here slack.deity.io.