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

feat: load balance between environments #3500

Merged
merged 2 commits into from
May 28, 2023

Conversation

djabarovgeorge
Copy link
Contributor

What change does this PR introduce?

make sure that all environments that are not prod will point to dev api.

Why was this change needed?

remove the load of the requests from prod api.

Other information (Screenshots)

the things that are still missing:

  • create cms novu org in dev and create blueprints.
  • after the templates are created updated the const popular blueprints in the code.
  • make sure we update dev environment variable: BLUEPRINT_CREATOR.


export const BLUEPRINTS_API_URL =
window._env_.REACT_APP_BLUEPRINTS_API_URL || isCypress
? window._env_.REACT_APP_BLUEPRINTS_API_URL || process.env.REACT_APP_BLUEPRINTS_API_URL || 'http://localhost:1336'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

window._env_.REACT_APP_BLUEPRINTS_API_URL allows to override that URL, should we keep that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we definitely can remove it, I left it is just in case we would want to override it.

};

export const POPULAR_TEMPLATES_GROUPED =
process.env.NODE_ENV === 'production' ? production().templates : development().templates;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we want to differentiate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the ids will be different in different environments.

…-blueprint-api

# Conflicts:
#	apps/api/src/app/blueprint/usecases/get-grouped-blueprints/consts.ts
@djabarovgeorge djabarovgeorge added this pull request to the merge queue May 28, 2023
Merged via the queue into next with commit 76939be May 28, 2023
26 of 27 checks passed
@djabarovgeorge djabarovgeorge deleted the remove-load-from-prod-blueprint-api branch May 28, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants