Skip to content
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

[Feature]: Add a method to identify the current environment in JavaScript #38180

Closed
1 task done
berengers opened this issue Dec 16, 2024 · 1 comment
Closed
1 task done
Assignees
Labels
Enhancement New feature or request

Comments

@berengers
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Summary

In Appsmith, it is possible to switch between different environments (staging, production, etc.). However, in the JavaScript code used within applications, there is currently no method to determine the active environment. Such a feature would allow developers to dynamically configure environment-specific variables, such as bucket URLs, selecting the correct bucket for S3 requests, or applying visual styles (e.g., different banner colors).

Why should this be worked on?

Being able to identify the active environment directly in JavaScript would provide additional flexibility and reduce the risk of errors, especially in production. For example:

Automatically configure the correct S3 bucket for requests based on the active environment (staging, production, etc.).
Display distinct visual indicators to avoid confusion between staging and production.
Simplify maintenance and application configuration by centralizing environment-specific logic.
This feature would enhance the quality and security of applications built with Appsmith while improving the developer experience.

@berengers berengers added the Enhancement New feature or request label Dec 16, 2024
@Nikhil-Nandagopal
Copy link
Contributor

This is a duplicate of #26610
One way to achieve this today would be to use Git to have a staging and production branch and customise the app / datasource based on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants