Skip to content

Commit 6fae897

Browse files
committed
bah
1 parent 4ecbd95 commit 6fae897

3 files changed

Lines changed: 23 additions & 24 deletions

File tree

‎v5-unity/bottle_server.py‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@
1919
import json
2020
import pg_logger
2121

22-
# dummy routes for testing only
23-
@route('/web_exec_<name:re:.+>.py')
24-
def web_exec(name):
25-
return 'OK'
2622

23+
@route('/web_exec_<name:re:.+>.py')
2724
@route('/LIVE_exec_<name:re:.+>.py')
28-
def live_exec(name):
29-
return 'OK'
30-
3125
@route('/viz_interaction.py')
32-
def viz_interaction():
26+
def dummy_ok(name=None):
3327
return 'OK'
3428

3529
@route('/<filepath:path>')
@@ -38,9 +32,13 @@ def index(filepath):
3832

3933

4034
# Note that this will run either Python 2 or 3, depending on which
41-
# version of Python you used to start the server.
42-
@get('/exec')
43-
def get_exec():
35+
# version of Python you used to start the server, REGARDLESS of which
36+
# route was taken:
37+
@route('/web_exec_py2.py')
38+
@route('/web_exec_py3.py')
39+
@route('/LIVE_exec_py2.py')
40+
@route('/LIVE_exec_py3.py')
41+
def get_py_exec():
4442
out_s = StringIO.StringIO()
4543

4644
def json_finalizer(input_code, output_trace):
@@ -58,5 +56,6 @@ def json_finalizer(input_code, output_trace):
5856

5957
return out_s.getvalue()
6058

59+
6160
if __name__ == "__main__":
6261
run(host='localhost', port=8003, reloader=True)

‎v5-unity/js/opt-frontend-common.ts‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ var appStateAugmenter: any = undefined; // super hacky! fixme
7979
var loadTestCases: any = undefined; // super hacky! fixme
8080

8181

82+
// note that these settings are all customized for my own server setup,
83+
// so you will need to customize for your own server:
84+
8285
// backend scripts to execute (Python 2 and 3 variants, if available)
8386
// make two copies of ../web_exec.py and give them the following names,
8487
// then change the first line (starting with #!) to the proper version
@@ -90,14 +93,10 @@ var loadTestCases: any = undefined; // super hacky! fixme
9093
// -rwxr-xr-x 1 pgbovine pgbovine 2.5K Jul 5 22:46 web_exec_py2.py*
9194
// (most notably, only the owner of the file should have write
9295
// permissions)
93-
//var python2_backend_script = 'web_exec_py2.py';
94-
//var python3_backend_script = 'web_exec_py3.py';
95-
96-
// uncomment below if you're running on Google App Engine using the built-in app.yaml
97-
var python2_backend_script = 'exec';
98-
var python3_backend_script = 'exec';
96+
var python2_backend_script = 'web_exec_py2.py';
97+
var python3_backend_script = 'web_exec_py3.py';
9998

100-
// empty dummy just to do logging on the Apache's server
99+
// empty dummy just to do logging on Apache server
101100
var js_backend_script = 'web_exec_js.py';
102101
var ts_backend_script = 'web_exec_ts.py';
103102
var java_backend_script = 'web_exec_java.py';
@@ -124,6 +123,11 @@ if (window.location.protocol === 'https:') {
124123
var CPP_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_cpp_jsonp'; // for deployment
125124
}
126125

126+
var serverRoot = (window.location.protocol === 'https:') ?
127+
'https://cokapi.com:8001/' :
128+
'http://104.237.139.253:3000/';
129+
130+
127131

128132
function langToBackendScript(lang) {
129133
var backend_script = null;

‎v5-unity/js/opt-live.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ declare var jsonp_endpoint: string;
7575
// -rwxr-xr-x 1 pgbovine pgbovine 2.5K Jul 5 22:46 web_exec_py2.py*
7676
// (most notably, only the owner of the file should have write
7777
// permissions)
78-
//var python2_backend_script = 'LIVE_exec_py2.py';
79-
//var python3_backend_script = 'LIVE_exec_py3.py';
80-
81-
// uncomment below if you're running on Google App Engine using the built-in app.yaml
82-
var python2_backend_script = 'exec';
83-
var python3_backend_script = 'exec';
78+
var python2_backend_script = 'LIVE_exec_py2.py';
79+
var python3_backend_script = 'LIVE_exec_py3.py';
8480

8581
// empty dummy just to do logging on the Apache's server
8682
var js_backend_script = 'LIVE_exec_js.py';

0 commit comments

Comments
 (0)