New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way for plug-ins to know whether the app is run from dev.ts #2361
Comments
Check out https://github.com/search?q=repo%3Adenoland%2Ffresh%20deno_deployment_id&type=code Currently fresh just looks for this environment variable. Could you you do the same in your plugin? |
Not all servers are deployed on Deno Deploy. I want a built-in alternative to |
I updated the title and the description to precisely describe the issue. |
Thanks, that makes sense. But FYI https://fresh.deno.dev/docs/concepts/deployment#docker. It's important to set that environment variable, if you're not running on deploy. Exposing the internal dev flag is probably more clear. |
Actually, this also makes sense for the end user’s side (like the developer working on the routes, not the user visiting the website). Some logic might be production-only or vice-versa. |
fresh/src/server/context.ts
Line 148 in e3508c3
Should this be public?
The text was updated successfully, but these errors were encountered: