Skip to content

Commit d44a1be

Browse files
committed
backend recieving the input
1 parent 009118e commit d44a1be

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

v3/js/opt-frontend-common.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ if (window.location.protocol === 'https:') {
7777
var JAVA_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_java_jsonp'; // for deployment
7878
var RUBY_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_ruby_jsonp'; // for deployment
7979
var C_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_c_jsonp'; // for deployment
80-
var CPP_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_cpp_jsonp'; // for deployment
80+
var CPP_JSONP_ENDPOINT = "http://127.0.0.1:5001/exec_cpp_jsonp"; //'http://104.237.139.253:3000/exec_cpp_jsonp'; // for deployment
8181
}
8282

8383

@@ -1700,7 +1700,8 @@ function executeCodeAndCreateViz(codeToExec,
17001700
jsonp: "callback",
17011701
dataType: "jsonp",
17021702
data: {user_script : codeToExec,
1703-
options_json: JSON.stringify(backendOptionsObj)},
1703+
options_json: JSON.stringify(backendOptionsObj),
1704+
raw_input_json: JSON.stringify(rawInputLst)},
17041705
success: execCallback,
17051706
});
17061707
} else {

v4-cokapi/cokapi.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3535
// Run with an 'https' command-line flag to use https (must have
3636
// the proper certificate and key files, though)
3737

38-
var IS_DEBUG = false;
38+
var IS_DEBUG = true;
3939

4040
var PRODUCTION_PORT = 3000;
4141
var PRODUCTION_HTTPS_PORT = 8001;
@@ -233,6 +233,8 @@ app.get('/exec_cpp_jsonp', exec_cpp_handler.bind(null, true, true));
233233
function exec_cpp_handler(useCPP /* use bind first */, useJSONP /* use bind first */, req, res) {
234234
var usrCod = req.query.user_script;
235235

236+
console.log(req.query.raw_input_json);
237+
236238
var exeFile;
237239
var args = [];
238240

@@ -261,8 +263,8 @@ var https = require('https');
261263
var fs = require('fs');
262264

263265
var options = {
264-
key: fs.readFileSync('cokapi.com.key'),
265-
cert: fs.readFileSync('cokapi.com-BUNDLE.crt')
266+
key: "",//fs.readFileSync('cokapi.com.key'),
267+
cert: ""//fs.readFileSync('cokapi.com-BUNDLE.crt')
266268
};
267269

268270
var args = process.argv.slice(2);

0 commit comments

Comments
 (0)