Environment Variables

Jul 1, 2023  │  m. Jul 2, 2023 by Gleb Buzin

Environment variables are a universal mechanism for conveying configuration information to Unix programs .

local secret = os.getenv("SECRET")
assert(secret ~= nil, "SECRET not set")
print(secret)
$ SECRET=12345 lua envtest.lua
12345


Next: Standard input/output