https://github.com/jondotsoy/envuse.js
Module to load environment variables from a `.envuse` file. Ideal to load configurations from the environment system, transform values and configure default values.
https://github.com/jondotsoy/envuse.js
Last synced: about 2 months ago
JSON representation
Module to load environment variables from a `.envuse` file. Ideal to load configurations from the environment system, transform values and configure default values.
- Host: GitHub
- URL: https://github.com/jondotsoy/envuse.js
- Owner: JonDotsoy
- License: mit
- Created: 2022-12-23T22:00:42.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2023-04-22T19:17:36.000Z (about 2 years ago)
- Last Synced: 2025-02-28T23:38:38.639Z (3 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/envuse
- Size: 206 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Envuse

Module to load environment variables from a `.envuse` file. Ideal to load configurations from the environment system, transform values and configure default values.
## Install
```sh
npm i --save envuse
```## Usage
Create your `.envuse` file.
```envuse
DB_URI
PORT:Number=3000
```and load with the `parse(string)` function.
```ts
import { parse } from "envuse"const config = parse(".envuse")
const port: number = config.PORT
```## Load default configs
```ts
import config from "envuse/config";const port: number = config.PORT;
```## Compatibility
Check the full list here [compatibility.json](./compatibility.json)