JavaScript Deploy same Javascript webapp build to different environments

I have an ExtJS application and some different environments (local machine, development, production-like test environment, and production). The ExtJS application is backed by a Java backend which is also running on either a local machine, in a development environment, a production-like test environment or a production environment (not the same servers as where the front end application lives though).

For the last two environments, I want to build ONE build of the ExtJS app and first deploy it to the test server, then when ready for release deploy the exact same build to the production server.

Question: Is it possible to somehow use the environment where the frontend is deployed, to decide which backend the ExtJS should connect to? Since the ExtJS front-end is executed on the client's machine, it doesn't know if it should connect to the production backend or the test backend.

What is the best way to solve a problem like this? How (in a clean way) is usually a javascript web application built and deployed to several different environments and communicates with their corresponding backend application?

Answer:1

I'm making a very unique progress bar that visually looks like a glass orb filling up with liquid. Unfortunately, because of the rounded shape, the traditional method of modifying the height doesn't ...

I'm making a very unique progress bar that visually looks like a glass orb filling up with liquid. Unfortunately, because of the rounded shape, the traditional method of modifying the height doesn't ...

I have a menu like : <ul> <li> <a class="scroll-to" href="#one">one</a> </li> <li> <a class="scroll-to" href="#two">two</a> ...

I have a menu like : <ul> <li> <a class="scroll-to" href="#one">one</a> </li> <li> <a class="scroll-to" href="#two">two</a> ...

  1. jquery class active
  2. jquery class active in menu
  3. jquery class active li
  4. jquery class active event
  5. jquery active class on click
  6. jquery active class based on url
  7. jquery active class add and remove
  8. jquery active class on scroll
  9. jquery active class toggle
  10. jquery active class remove
  11. jquery active class not working
  12. jquery active class w3schools
  13. jquery active class index
  14. jquery active class add
  15. jquery active class navigation
  16. jquery active class bootstrap
  17. jquery active class url
  18. jquery active class button
  19. jquery active class css
  20. jquery check class active

I have a simple JQuery code where I'm trying to get the value of an ASP:HiddenField and display it, but it does not show anything. The hidden field is in the form, not inside any table or div. <...

I have a simple JQuery code where I'm trying to get the value of an ASP:HiddenField and display it, but it does not show anything. The hidden field is in the form, not inside any table or div. <...

  1. value hidden field jquery
  2. value hidden field rails
  3. set value hidden field jquery
  4. get value hidden field jquery
  5. set value hidden field javascript
  6. get value hidden field javascript
  7. change value hidden field jquery
  8. add value hidden field jquery
  9. pass value hidden field javascript
  10. assign value hidden field jquery
  11. javascript value hidden field
  12. set value hidden field jquery asp.net
  13. set value hidden field c#
  14. set value hidden field struts2
  15. add value hidden field javascript
  16. get value hidden field c#
  17. update value hidden field jquery
  18. get value hidden field gridview c#
  19. set value hidden field javascript asp.net
  20. set value hidden field

I've created a html list of buttons/text from an array called items in an .EJS template. How do I pass the specific item's id (item.id) to the button's function so I can send the right data to my api? ...

I've created a html list of buttons/text from an array called items in an .EJS template. How do I pass the specific item's id (item.id) to the button's function so I can send the right data to my api? ...

  1. php pass variable to inline function
  2. javascript pass variable to inline function
  3. jquery pass variable to inline function