Reputation: 3079
I know that azure web sites/app respects the following element in package.json in node js application for configuring host node and desired npm:
"engines": {
"node": "6.11.1",
"npm": "4.6.1"
}
Is there also a way to indicate require either 32-bit or 64-bit version of node for hosting in azure web apps?
Upvotes: 2
Views: 2623
Reputation: 4306
The Node.js (npm) package.json
file has a cpu property that should achieve what you're looking for.
From the npmjs package docs -
cpu
If your code only runs on certain cpu architectures, you can specify which ones.
"cpu" : [ "x64", "ia32" ]
Like the os option, you can also blacklist architectures:
"cpu" : [ "!arm", "!mips" ]
The host architecture is determined by process.arch
In your case, if you'd like to set your Azure environment to 32bit, simply set "cpu" : [ "ia32" ]
; if you'd like the 64 bit environment, set it to "cpu" : [ "x64" ]
.
Upvotes: 3