In order to do some image processing using the Node library, Sharp, I had to upgrade my node executable on Azure App Service to 64-bits. I did this by downloading the executable
The default node.js executation applications on Azure Web Apps are all in 32bit. So it raises your issue. We can use the custom node.js runtime to achieve your requirement. Please try the following steps:
1, Put a 64bit node.exe executation application in your application, e.g.
in a runtime
folder.
2, Modify the iisnode.yml
, set:
nodeProcessCommandLine: "D:\home\site\wwwroot\runtime\node.exe"
3, Deploy your entire application to Azure Web Apps.
Additionally, you can use the following code to verify that whether the node.js binary is x64
or not.
var http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, { "Content-Type": "text/plain" });
response.write(require('os').arch());
response.end();
}).listen(process.env.PORT);
Please let me know if this does not work.