Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.68 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.68 KB

Coding standards status Static analysis status Unit tests status Total Downloads Latest Stable Version License

Nuxed Environment

The Nuxed Environment component provides functions that help you manage environment variables.

Installation

This package can be installed with Composer.

$ composer require nuxed/environment

Example

use namespace Nuxed\Environment;

<<__EntryPoint>>
async function main(): Awaitable<void> {
  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.


License

Nuxed is open-sourced software licensed under the MIT-licensed.