On server start, a
.forestadmin-schema.jsonfile will be auto-generated in local (development) environments only. It reflects:
- the state of your collections.
- your Forest Admin customization.
This file must be versioned and deployed for any remote environment (staging, production, etc.), as it will be used to generate your Forest UI.
We use the option
createAgentfunction. You can use
isProduction: process.env.NODE_ENV === 'production'to manipulate this behavior. Setting this variable to either
falsewill regenerate a new .forestadmin-schema.json file every time your app restarts. Using
truewill not regenerate the file.
A consequence of the above is, in Production the
.forestadmin-schema.jsonfile does not update according to your schema changes.
Do not edit this file, as it could break your interface if the wrong syntax is used.
.forestadmin-schema.jsonfile will also help you visualize your changes: