Would be amazing if this could configure enviroment variables as well
See original GitHub issueIssue Type
- Bug Report
- Feature Request
- Other
Possible Solutions
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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How To Set Environment Variables
Environment variables in your system describe your environment. Learn how to set up environment variables in Linux, Windows, macOS, ...
Read more >Environment Variables and Why You Shouldn't Use Them
Using environment variables is a somewhat common practice during Development but it is actually not a healthy practice to use with Production.
Read more >3 benefits of environment variables and how to use them
With environment variables, you can just create a single config and tweak it based on the values you define.
Read more >Environment Variables: What They Are and How To Use ...
Environment variables are used to store app secrets and configuration data, which are retrieved by your running app when needed.
Read more >what you should know about ENV configuration
An exploration of the usage and limitations of ENV (environment variables) in configurations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It was always the defacto package I would turn to. I’d like to see support for inline scripts in denox and env variable support would be an important component.
I am fine with the last one.
I can also see something like this -
I think this should also allow the global layer, like you do with permissions.
Optionally, would you use a file and the vars at the same time? In other words if the YAML parsed as a string vs a object, you could handle it different.
Parse as a object, no need for a file
Parses as a string, going to disk