Skip to content
Load environment variables from .dotenv files or straight from the OS to Caché
Apex OpenEdge ABL
Branch: master
Clone or download
Latest commit ffd7c64 Jul 24, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cls Fixed mistype Jul 11, 2017
tests Fixed mistype Jul 11, 2017
CONTRIBUTING.md Added the code Jul 11, 2017
LICENSE Initial commit Jul 11, 2017
README.md Update README.md Jul 24, 2017
dotenv.xml Fixed mistype Jul 11, 2017

README.md

dotenv

Almost every language has dotenv. So why not Caché?

Add the capability of reading environment variables from a .dotenv file or straight from your running OS.

Installing

The easiest way is to simply import the dotenv.xml provided.

Usage

Quick and easy:

  • If you want to read from your OS use ##class(DotEnv.Parser).FromOS()
  • If you want to read from a file use ##class(DotEnv.Parser).FromPath()

Each method returns an %ArrayOfDataTypes instance populated with your env variables. When using FromPath, existing ones aren't overwritten.

.env files should be composed using the following format:

YOUR_VARIABLE="your value"
YOUR_NUMBER=1337
WHATEVER="you want, it\'s also \nescaped"

CONTRIBUTING

Got some idea? Follow this guide.

If you want to run those tests you must have Port installed since it uses a different mechanism for running them straight from your repository folder.

LICENSE

MIT.

You can’t perform that action at this time.