How do I pass command line arguments to a Node.js program?

后端 未结 30 3263
梦如初夏
梦如初夏 2020-11-22 04:03

I have a web server written in Node.js and I would like to launch with a specific folder. I\'m not sure how to access arguments in JavaScript. I\'m running node like this:

30条回答
  •  借酒劲吻你
    2020-11-22 04:25

    Commander.js

    Works great for defining your options, actions, and arguments. It also generates the help pages for you.

    Promptly

    Works great for getting input from the user, if you like the callback approach.

    Co-Prompt

    Works great for getting input from the user, if you like the generator approach.

提交回复
热议问题