With a purpose to maintain api key secret and never arduous coding them in code I’ve created .env file the place I’ve set the worth of key proven under. Now I need to inject this worth throughout construct time.
1 .env file
API_KEY=”2131224″
2 I’ve additionally added the next run script
#!/usr/bin/env bash
grep -v ‘^#’ .env
export $(grep -v ‘^#’ .env | xargs)
3 Throughout compile time I’m able to see the API_KEY in logs, However I don’t know learn how to assign it to var throughout api name.
I attempted to entry worth utilizing ProcessInfo, however it didn’t work.
ProcessInfo.processInfo.atmosphere[“API_KEY”]
Any concept how can I entry this?