1. Create the silo
Create a Public silo namedapp-config with this JSON:
app-config.json
2. Read the flags
Always keep a set of defaults in your code. If the request fails or is slow, the app still starts with known values.- JavaScript
- React
- Python
config.js
main.js
3. Flip a flag
Pick whichever fits your workflow:- Console: Open the silo, go to the Data & schema tab, change the value, and save. See Update Silo.
- Code or CI: Send the new JSON with the Manage API. See Update a silo from code and CI.
- AI assistant: Ask “Turn on
darkModein myapp-configsilo.” See Edit silos with an AI assistant.
4. Protect the shape with Schema Lock
Every app reading this silo expectsmaintenance to be a boolean. A typo such as "maintenance": "no" would turn on maintenance mode, because a non-empty string is truthy in JavaScript.
Lock a schema on the silo to stop that. With the generated strict schema locked:
Good to know
- Each fetch is a request. Public silo reads count towards the silo owner’s daily limit. For busy sites, fetch once per session and keep the result in memory or
sessionStorage. See Rate Limits. - The whole document is returned. Public silos don’t support Query or Search, so keep config silos small.
- The URL can change. Switching the silo to private or moving it to another region gives it a new URL. Update your apps if you do.