Node.js GraphicsMagic: check installation and functionality

I am working with the Node.js gm ( Github ) module for GraphicsMagic ( Link ).

How to determine if gm installed gm software for gm module is installed and fully functional node.js on the current computer or not? (I want to check this on the process of initializing my server)

+4
source share
1 answer

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. }); 
+7
source

Source: https://habr.com/ru/post/1484969/


All Articles