I am working with the Node.js
module gm
(Github) for GraphicsMagic
(Link).
How can I determine whether the required GraphicsMagic
software for the gm
module is installed & fully functional on the current node.js machine or not? (I want to check this on the initialization process of my server)
You can call the command line tool and check the output.
var exec = require('child_process').exec;
exec("gm", function (error, stdout, stderr) {
// Validate the output with one of the parameters.
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With