An open API service indexing awesome lists of open source software.

https://github.com/ysdragon/dotenv

An easy to use dotenv package for Ring.
https://github.com/ysdragon/dotenv

dotenv ring ring-programming-language

Last synced: 4 months ago
JSON representation

An easy to use dotenv package for Ring.

Awesome Lists containing this project

README

          


dotenv

An easy to use dotenv package for Ring

[![Ring](https://img.shields.io/badge/Made%20with-Ring-2D54CB)](https://github.com/ring-lang/ring)

## Features

- Read environment variables from `.env` files.
- Read environment variables from custom .env files.
- Set config variables to the environment.
- Unset config variables from the environment.

## How to install?
Using Ring Package Manager **`ringpm`**

```bash
ringpm install dotenv
```

## Example

```ring
load "dotenv.ring"

dotenv = new dotenv

// Load default .env file
dotenv.loadDefault()

testVar = dotenv.getEnv("USERNAME")

print(testVar)
```

#### [More examples](https://github.com/ysdragon/dotenv/tree/main/examples)

## License
This project is open-source and available under the MIT License. See the [LICENSE](https://github.com/ysdragon/dotenv/blob/master/LICENSE) file for more details.