ytake/hackdotenv

Loads environment variables from .env to getenv()

Installs: 210

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Language:Hack

0.9.1 2020-07-03 00:17 UTC

This package is auto-updated.

Last update: 2021-03-31 02:25:21 UTC


README

Loads environment variables from .env to getenv().

Build Status

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');