How does the JSON config format get exposed to a program?
I have a Go program that, before trying out Railway, would read in a
.yaml
file and parse that into a config structure. I'd prefer to not rework that setup to support environment variables, and I see that one can supply a JSON object instead. How does that get loaded? Does it get passed in as a string in an environment variable, or as a file with a certain name, or something like that?Solution:Jump to solution
the JSON entry in the web UI is provided for convenience, it only supports a single level object with key value pairs
7 Replies
Project ID:
N/A
N/A
they are injected as regular system environment variables and can be read with
os.Getenv("SPECIAL_KEY")
Does the object support any nesting or does it have to be flat?
Solution
the JSON entry in the web UI is provided for convenience, it only supports a single level object with key value pairs
Alright, thank you!
no problem!