[Feature Request] Set os environment variable during dev
See original GitHub issueWhen running miniflare
from cli (or perhaps through node api) set a process.env.MINIFLARE = true
header.
Why?
When using build tools like esbuild or like id like to run slightly different code during my local dev time, than the worker running on the real platform.
Currently im env MINIFLARE=1 miniflare
— but be awesome to have this first-class.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Environment Variables: What They Are and How To Use Them
Environment variables add dynamicity to your static code base; you can switch between internal/external resources based on the value of the ...
Read more >Use multiple environments in ASP.NET Core | Microsoft Learn
Use multiple environments in ASP.NET Core · Environments · Set the environment by setting an environment variable · Set the environment in code....
Read more >Set an Environment Variable - Forum - VisualCron
Is there a way to set the value of an environment variable for all the tasks in a job? Ideally the list of...
Read more >Basic Features: Environment Variables - Next.js
Environment Variables on Vercel When deploying your Next.js application to Vercel, Environment Variables can be configured in the Project Settings. All types ...
Read more >Environment Variables – Vercel Docs
The Add New section of the Environment Variables page in the Project Settings. Enter the desired Name for your Environment Variable. For example,...
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
Hey! 👋 This definitely sounds useful for build scripts. Wondering if it’s also worth setting a
MINIFLARE
global totrue
in the actual worker context too… 🤔Hey! 👋 Depends on where you’re using it. If it’s in your actual worker code…
Note the
globalThis.
to avoid theReferenceError
.If it’s in a custom Node.js build script, say
build.js
…