From 3bc57876ad8e157d58350cbcc14816ccf7805c13 Mon Sep 17 00:00:00 2001 From: william Date: Tue, 2 Feb 2016 13:26:35 -0500 Subject: [PATCH] runner --- routes/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/api.js b/routes/api.js index 0a8f72e..2f6ad79 100644 --- a/routes/api.js +++ b/routes/api.js @@ -84,9 +84,10 @@ router.get('/list', function(req, res, next) { }); }); -router.post('/run', function(req, res, next){ +router.post('/run/:ip?', function(req, res, next){ var runner = function(res, req, ip){ request.post({url:'http://'+ip, body:req.post}, function(error, response, body){ + console.log('runner body:', body) body = JSON.parse(body); body['ip'] = ip.replace('10.0.', '') return res.json(body)