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.', '');