I am trying to start redis from node using the child_process module with the following code:
var childProcess = require('child_process');
childProcess.exec('redis-server --port 6380', function(err, stdout, stderr) {
console.log(err, stdout, stderr);
})
When I run it, the callback is never called. I can see that my redis-server has started on port 6380 using ps auwx | grep redis-server so I don't get why this callback is not called.
Note that when I run redis-server --port 6380 in my terminal, redis starts just fine as well.
I've tried this with memcached instead and it works fine.
What is the reason why this callback is not called?
Many thanks
Aucun commentaire:
Enregistrer un commentaire