Add a prefix to generic environment variables for clarity #170
chammika-become
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In surrealDB server
start
subcommand insrc/cli/mod.rs
all the environment variable looks generic ex: DB_PATH, USER, PASS, KEY etc. Better to prefix them with saySURREALDB_
for clarity. For one,$USER
which is already set by shell to the current user is probably not the intended SurrealDB user. Also, separating the environment variable namespace with a prefix helps when SurrealDB is deployed with other services, to set the environment clearly and unambiguously.Now:
Proposed:
FYI: There is a proposal in clap to make this to a feature with
env_prefix
clap-rs/clap#3221 but looks like it is not there yet for other reasons. For now eachenv
name need to be updated with prefix.Beta Was this translation helpful? Give feedback.
All reactions