简体   繁体   English

node.exe文件的作用是什么?

[英]What is the file node.exe for?

I'm learning Node.js on a Windows environment. 我正在Windows环境中学习Node.js So far, I've been using the Node.js command prompt shortcut to run the commands. 到目前为止,我一直在使用Node.js command prompt快捷方式来运行命令。

But the Windows installer also creates a shortcut named simply Node.js that points to "C:\\Program Files\\nodejs\\node.exe" and I'm not sure what is it for. 但是Windows安装程序还会创建一个名为Node.js的快捷方式,该快捷方式指向“ C:\\ Program Files \\ nodejs \\ node.exe”,但我不确定它的用途是什么。

How can I use that program? 如何使用该程序?

node.exe is full Node.JS executable, containing everything you need to run Node.JS applications on Windows. node.exe是完整的Node.JS可执行文件,包含在Windows上运行Node.JS应用程序所需的一切。

You used the default installer, so it got installed to C:\\Program Files\\nodejs\\node.exe . 您使用了默认安装程序,因此将其安装到C:\\Program Files\\nodejs\\node.exe But you can also download it separately ( Windows Binary option), and, for example, bundle it with your application package to simplify the installation on many machines. 但是,您也可以单独下载它Windows Binary选项),例如,将其与应用程序包捆绑在一起以简化在许多计算机上的安装。

There's no real need to use "Node.js command prompt" shortcut. 真正不需要使用“ Node.js命令提示符”快捷方式。 You can launch Node.JS apps from regular Windows command line terminal, providing full path to node.exe executable (wherever it is actually located). 您可以从常规Windows命令行终端启动Node.JS应用,从而提供node.exe可执行文件的完整路径(无论它实际位于何处)。 An example: 一个例子:

C:\Program Files\nodejs\node.exe app.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM