search

Home  >  Q&A  >  body text

node.js - node脚本可执行文件

已经写好了实现某个功能的node脚本。如何将这个脚本转换为可执行文件。使得没有node环境的情况下也可以通过执行exe文件运行,实现脚本功能。

迷茫迷茫2778 days ago576

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:56:37

    How can you run java without a java environment? How can you run node without a node environment?
    How can people survive without a human living environment?

    1. The system provides a corresponding environment, and then you can run your node directly
    2. Package an environment, such as packaging the node environment and your node script together, such as the current electron or nwjs
    3 .Use your target environment (such as linux shell), write a shell script, install your node environment after running it, and then run your script

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:56:37

    The requirement you talked about can be achieved with electron.
    It just costs money to learn, I’m not sure if you got what I said

    reply
    0
  • Cancelreply