My baseUrl path for jQuery ajax requests is different in development and production mode. How can I set it in some kind of config.ini file to switch it easily. Rightnow I’m using a baseurl.js file containing just baseurl path. In production mode, I change this variable via shell script.
What should be better approach?
edit
To make things little clearer,
$.ajax({
type: "GET",
url: myurl,
dataType: "script"
});
Here ‘myurl’ var is different for production and development.
PS: My question is not about version control or packing files into one.
If you are using some dynamic pages technology (asp, php, …) then you could turn your
baseurl.jsfile to a dynamic one likebaseurl.js.phpand inside it print the current url . (if that is what you are asking).