projects
/
VSoRC
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dbac5cb
)
changed ths script to spawn in the index.js
author
Oscar J. Rodriguez B
<josuer08@gmail.com>
Thu, 3 Oct 2019 20:29:18 +0000
(16:29 -0400)
committer
Oscar J. Rodriguez B
<josuer08@gmail.com>
Thu, 3 Oct 2019 20:29:18 +0000
(16:29 -0400)
src/routes/index.js
patch
|
blob
|
history
diff --git
a/src/routes/index.js
b/src/routes/index.js
index 3e06433a467fe7452bd957341260405bf96c0fd5..70758258231c1c6092ebfaeed0b650927854249a 100644
(file)
--- a/
src/routes/index.js
+++ b/
src/routes/index.js
@@
-73,11
+73,15
@@
router.get('/gettopo', (req, res) => {
router.get('/startcontroller', (req, res) => {
var sys = require('sys')
router.get('/startcontroller', (req, res) => {
var sys = require('sys')
- var exec = require('child_process').
exec
;
+ var exec = require('child_process').
spawn
;
var child;
var child;
- chlid = exec("cd /home/pi/ryu && ./ejecutarcontroller.sh", function(error, stdout, stderr){
- console.log("startcontroller");
- res.send(stdout);
+ chlid = spawn('python', ['-f','./../pypy.py']);
+
+ pyProg.stdout.on('data', function(data) {
+
+ console.log(data.toString());
+ res.write(data);
+ res.end('end');
});
});
module.exports = router;
});
});
module.exports = router;