https://github.com/nuxed/environment
The Nuxed Environment component provides functions that help you manage environment variables.
https://github.com/nuxed/environment
dotenv dotenv-loader dotenv-parser environment environment-variables hack hacklang hhvm nuxed
Last synced: 28 days ago
JSON representation
The Nuxed Environment component provides functions that help you manage environment variables.
- Host: GitHub
- URL: https://github.com/nuxed/environment
- Owner: nuxed
- License: mit
- Created: 2019-10-23T20:20:05.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2020-11-22T14:59:27.000Z (about 5 years ago)
- Last Synced: 2025-07-21T04:47:47.076Z (7 months ago)
- Topics: dotenv, dotenv-loader, dotenv-parser, environment, environment-variables, hack, hacklang, hhvm, nuxed
- Language: Hack
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README




[](https://packagist.org/packages/nuxed/environment)
[](https://packagist.org/packages/nuxed/environment)
[](https://packagist.org/packages/nuxed/environment)
# Nuxed Environment
The Nuxed Environment component provides functions that help you manage environment variables.
### Installation
This package can be installed with [Composer](https://getcomposer.org).
```console
$ composer require nuxed/environment
```
### Example
```hack
use namespace Nuxed\Environment;
<<__EntryPoint>>
async function main(): Awaitable {
await Environment\load('.env');
if(!Environment\contains('APP_MODE')) {
Environment\put('APP_MODE', 'prod');
}
$mode = Environment\mode();
switch($mode) {
case Environment\Mode::Development:
// Dev
case Environment\Mode::Production:
// Prod
case Environment\Mode::Test:
// Test
}
}
```
---
### Security
For information on reporting security vulnerabilities in Nuxed, see [SECURITY.md](SECURITY.md).
---
### License
Nuxed is open-sourced software licensed under the MIT-licensed.