code below :
代码如下:
var out = '';
var file = __dirname + '/../public/images/_DSC5813.jpg';
execFile('openssl', ['sha1', file], function (err, sdtout, sdterr) {
if (err) {
out = err.message; // the error message is 'spawn openssl ENOENT'
console.log(err);
}
else {
out = sdtout.toString();
console.log(sdtout);
console.log(out);
}
res.render('index', { title: 'Express', message: out });
});
anyone have the same issue seem to be the azure server not install openssl correctly?!
任何人都有相同的问题似乎是天蓝色的服务器没有正确安装openssl?!
1 个解决方案
#1
1
Yes, Azure Web App default environment doesn't install the openssl application. You can go to https://<your_web_app_name>.scm.azurewebsites.net/Env.cshtml
for a glance of all the installed application / environment and path variables.
是的,Azure Web App默认环境不会安装openssl应用程序。您可以访问https://
If you need to execute the openssl application in your project, you can put the executable application openssl.exe
in your package, and deploy then together to Azure. When you need to execute in your project, you can leverage the relative path in your application's directory path.
如果需要在项目中执行openssl应用程序,可以将可执行应用程序openssl.exe放在包中,然后一起部署到Azure。当您需要在项目中执行时,可以利用应用程序目录路径中的相对路径。
#1
1
Yes, Azure Web App default environment doesn't install the openssl application. You can go to https://<your_web_app_name>.scm.azurewebsites.net/Env.cshtml
for a glance of all the installed application / environment and path variables.
是的,Azure Web App默认环境不会安装openssl应用程序。您可以访问https://
If you need to execute the openssl application in your project, you can put the executable application openssl.exe
in your package, and deploy then together to Azure. When you need to execute in your project, you can leverage the relative path in your application's directory path.
如果需要在项目中执行openssl应用程序,可以将可执行应用程序openssl.exe放在包中,然后一起部署到Azure。当您需要在项目中执行时,可以利用应用程序目录路径中的相对路径。