ytake / hackdotenv
Loads environment variables from .env to getenv()
Fund package maintenance!
ytake
Installs: 216
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Language:Hack
Requires
- hhvm: ^4.62
- hhvm/hhvm-autoload: ^3.0
- hhvm/hsl: ^4.0
- hhvm/hsl-experimental: ^4.25
Requires (Dev)
- facebook/fbexpect: ^2.7.3
- hhvm/hacktest: ^2.0.0
- hhvm/hhast: ^4.0.0
README
Loads environment variables from .env to getenv().
vlucas/phpdotenv converted for Hack
require HHVM >=4.20
Install
$ hhvm $(which composer) require ytake/hackdotenv
Usage
Your application configuration to a .env file in the root of your project.
FOO=bar
BAR=baz
You can then load .env in your application.
use type Ytake\Dotenv\Loader; $dotenv = new Dotenv($this->dir); await $dotenv->loadAsync();
use namespace Ytake\Dotenv; Dot\env('FOO');