From 96c931ba5c5727d4c48ee1a3ccfe36d698e2893c Mon Sep 17 00:00:00 2001 From: william Date: Fri, 22 Apr 2016 22:50:19 -0400 Subject: [PATCH] crunner --- routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.js b/routes/api.js index 9e4e483..317c6b8 100644 --- a/routes/api.js +++ b/routes/api.js @@ -31,7 +31,7 @@ var runner = function(req, res, ip){ console.log('ip:', ip); lxcTimeout(ip); console.log('code to run:\n', req.body.code); - return request.post({url:'http://'+ip, body: {code: req.body.code} }, function(error, response, body){ + return request.post({url:'http://'+ip, body: JSON.stringify({code: req.body.code}) }, function(error, response, body){ console.log(body); // body = JSON.parse(body); body['ip'] = ip.replace('10.0.', '');