From e6d5472df95d551f9b7fd8bcf9824387736da833 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Wed, 3 Dec 2014 15:08:50 +0200 Subject: construct backend URL using rz_config --- src/rz_api_backend.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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); } /** -- cgit v1.3.1