Which version of node.js is running on Windows Azu

2020-07-09 10:35发布

Which version of node.js is actually running on Windows Azure Web Sites?

4条回答
Deceive 欺骗
2楼-- · 2020-07-09 10:46

There are many versions of node preinstalled on the Windows Azure Web Sites servers and you can choose which one gets used by specifying your minimum required version in your package.json file. Instructions here.

The versions available change on a regular basis, but to give you a sense, the currently available versions (as of November 1, 2013) is: 0.6.17, 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.10.5, 0.10.18, 0.10.21.

查看更多
狗以群分
3楼-- · 2020-07-09 10:46

By default 0.6.20

BUT you can set your own version:

  1. Upload (ftp) node executable (not the installer!) to bin folder in your wwwroot or wherever you please. i.e. get it from here: http://nodejs.org/dist/v0.10.12/node.exe
  2. Add

    nodeProcessCommandLine: "D:\home\site\wwwroot\bin\node.exe"
    

to iisnode.yml (must be located where your server.js is)

[source: http://www.windowsazure.com/en-us/develop/nodejs/common-tasks/specifying-a-node-version/ ]

查看更多
狗以群分
4楼-- · 2020-07-09 10:49

It turns out to be, at the moment of writing: v0.6.20.

Quickly found out via the following script:

var http = require('http');
http.createServer(function(req, res){
    res.writeHead(200, {'content-type': 'text/plain'})
    res.end('Version - ' + process.version);
}).listen(process.env.port || 1337)

To follow and try it yourself follow these steps.

查看更多
贼婆χ
5楼-- · 2020-07-09 10:53

I found this: http://hardcoded.se/2015/01/07/node-js-version-on-azure-websites/

In the KUDU environment of your app (accessible through the url deletemesoon.scm.azurewebsites.net if your website has the url deletemesoon.azurewebsites.net) hit runtime versions and you will receive a JSON representation of available versions.
Hope this answers your question.

查看更多
登录 后发表回答