For using it in swift first you have to have:
-
Installed the SwiftDotEnv package.
For a .env
file like this:
import DotEnv
let env = DotEnv(withFile: ".env")
let DB_NAME = env.get("DB_NAME")
print(DB_NAME)
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
For using it in swift first you have to have:
Installed the SwiftDotEnv package.
For a .env
file like this:
import DotEnv
let env = DotEnv(withFile: ".env")
let DB_NAME = env.get("DB_NAME")
print(DB_NAME)