-
-
Save KATT/2f32a790939982eaa18d9cb5d62d5c7f to your computer and use it in GitHub Desktop.
Keep all your process.env in a config file, so it is easy to check env vars available
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { cleanEnv, str, num, url } from 'envalid' | |
const env = cleanEnv(process.env, { | |
GRAPHQL_URL: url({ | |
devDefault: 'http://localhost:4000/graphql', | |
}), | |
PORT: num({ | |
devDefault: 3000, | |
}), | |
A: str(), | |
}) | |
export default env; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment