There are three ways to get configuration variables into a function, all of which will be available as environment variables. These are ordered in order of preference, the later ones overriding the previous ones.
fn config app myapp LOG_LEVEL debug
See Function file for more info.
fn config route myapp hello2 LOG_LEVEL info