You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5240adc
Browse filesBrowse the repository at this point in the historyBrowse files
'exception_msg': "Unknown error. Report a bug to philip@pgbovine.net by clicking on the\n'Generate URL' button at the bottom and including a URL in your email."}]};
68
-
res.send(JSON.stringify(errTrace));
73
+
if(useJSONP){
74
+
res.jsonp(errTrace/* return an actual object, not a string */);
75
+
}else{
76
+
res.send(JSON.stringify(errTrace));
77
+
}
69
78
}
70
79
}else{
71
-
res.send(stdout);
80
+
if(useJSONP){
81
+
// stdout better be real JSON!!!
82
+
res.jsonp(JSON.parse(stdout)/* return an actual object, not a string */);
83
+
}else{
84
+
res.send(stdout);
85
+
}
72
86
}
73
87
}
74
88
75
89
76
90
varapp=express();
77
91
92
+
// http://ilee.co.uk/jsonp-in-express-nodejs/
93
+
app.set("jsonp callback",true);
94
+
78
95
app.use(serveStatic('frontends/'));// put all static files in here
0 commit comments