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

Several Ways of API_ORIGIN in Web FrontEnd Project #114

Open
xianshenglu opened this issue May 4, 2020 · 0 comments
Open

Several Ways of API_ORIGIN in Web FrontEnd Project #114

xianshenglu opened this issue May 4, 2020 · 0 comments

Comments

@xianshenglu
Copy link
Owner

For most web projects, the final entry for users is a URL. Always, different URL means different environment, also different server or server config. Therefore, the ways we can use to bind environments are clear.

  • Bind environment with URL.
  • Bind environment with server or server config.
  • Bind environment with project config.

So, which one is the best? Well, it depends.

Bind Env By URL

Bind Env By Server

Bind Env By Project Config

It's common to see many build commands in package.json like npm run build:test, npm run build:sit, npm run build:prod. The point is building different bundles for different environments.

@xianshenglu xianshenglu changed the title Several Ways of Web Project Environment Binding Several Ways of API_ORIGIN in Web FrontEnd Project Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant