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

0.9.1 2020-07-03 00:17 UTC

This package is auto-updated.

Last update: 2024-10-29 05:10:53 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');