summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-12-03 15:08:50 +0200
committerLV-426 <lv-426@taproot.org.il>2014-12-03 15:23:22 +0200
commite6d5472df95d551f9b7fd8bcf9824387736da833 (patch)
tree4dae547e97474002ad4a1c3f2d31ffb3bb737dde
parent591ea9d4a1f0b36c5caf062dbfaffbc7dbb348e9 (diff)
construct backend URL using rz_config
-rw-r--r--src/rz_api_backend.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rz_api_backend.js b/src/rz_api_backend.js
index df162225..7acf5916 100644
--- a/src/rz_api_backend.js
+++ b/src/rz_api_backend.js
@@ -3,10 +3,12 @@
/**
* API calls designed to execute against a local backend service
*/
-define([], function() {
+define(['rz_config'], function(rz_config) {
function RZ_API_Backend() {
+ var rz_server_url = 'http://' + rz_config.rz_server_host + ':' + rz_config.rz_server_port;
+
/**
* issue rhizi server ajax call
*/
@@ -41,7 +43,7 @@ define([], function() {
req_opts.timeout = 8000; // ms
req_opts.crossDomain = true;
- $.ajax('http://127.0.0.1:3000' + path, req_opts);
+ $.ajax(rz_server_url + path, req_opts);
}
/**