BentoumiTech / BentoumiTech/denox
Would be amazing if this could configure enviroment variables as well
- Dominant language
- TypeScript
- Stars
- 135
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Type
- [ ] Bug Report
- [x] Feature Request
- [ ] Other
## Possible Solutions
```yaml
scripts:
# "denox run start" will execute main.ts with example.com networking permissions
start:
file: main.ts
env:
PORT: 80
DOMAIN: "example.net"
deno_options:
allow-net: example.com
# "denox run develop" will execute main.ts with localhost networking permissions and source code cache reloaded
develop:
file: main.ts
env:
PORT: 3000
DOMAIN: "localhost"
deno_options:
allow-net: localhost
reload: true
```
Then it would add the variables to Deno using Deno.env.set('NAME', 'VALUE')
Then we can access it via Deno.env.get("NAME")
It would require `--allow-env` to be set.
Contributor guide
Research direction
No repository files or tests are named. Start by locating the configuration handling for `denox run start` and `denox run develop`, then trace how each command launches `main.ts`; verify whether configured `PORT` and `DOMAIN` values can reach `Deno.env.get` under `--allow-env`. Done means both examples expose their variables without breaking existing permission options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100