Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crewdevio/dino_env
🌈 manage environment variables with deno.
https://github.com/crewdevio/dino_env
deno denoland dino-env environment-variables typescript
Last synced: 3 months ago
JSON representation
🌈 manage environment variables with deno.
- Host: GitHub
- URL: https://github.com/crewdevio/dino_env
- Owner: crewdevio
- License: mit
- Created: 2020-06-15T16:59:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-03T09:24:10.000Z (over 2 years ago)
- Last Synced: 2024-04-14T09:58:31.785Z (9 months ago)
- Topics: deno, denoland, dino-env, environment-variables, typescript
- Language: TypeScript
- Homepage:
- Size: 7.81 KB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno-cn - @crewdevio/dino_env
README
# dinoenv
manage environment variables with deno.
## Usage
specify the path of the `.env` file and import dino_env.
install dino_env with [trex](https://deno.land/x/trex) using:
```sh
$ trex install --map dinoenv
``````javascript
import * as env from "dinoenv";env.config();
```or directly with the url.
```javascript
import * as env from "https://deno.land/x/dinoenv/mod.ts";env.config();
```## Config
you can specify the path of the .env file.
```javascript
import * as env from "https://deno.land/x/dinoenv/mod.ts";env.config({ path: "./environment/.env" });
```> **note**: by default use root project path
change the decode of the `.env` file
```javascript
import * as env from "https://deno.land/x/dinoenv/mod.ts";env.config({ path: "./environment/.env", encoding: "utf-8" });
```> **note**: by default use "utf-8"
## permissions
```sh
--allow-read --allow-env
```