Configuration settings are stored within a JSON object located inside the /config folder. You can add multiple config files here for each development environment that you're using.
Gravity ships with default and production config files to get you started.
Using this approach will enable you to load the correct configuration depending on your environment. For example, you can load your test Stripe API keys in your local development environment and your live keys when running in production.
To access the key value pairs in the config file within your code, you first need to import the config file. First, import the config package and then get the specific object you want from the config file.
const config = require('config');const settings = config.get('stripe');
This will import the Stripe settings from the config file loaded in your current environment.