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.
- Host: GitHub
- URL: https://github.com/ysdragon/dotenv
- Owner: ysdragon
- License: mit
- Created: 2024-08-27T20:21:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-02T14:31:16.000Z (over 1 year ago)
- Last Synced: 2025-05-21T20:46:02.731Z (9 months ago)
- Topics: dotenv, ring, ring-programming-language
- Language: Ring
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dotenv
An easy to use dotenv package for Ring
[](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.