--be_ip 参数来自哪里的命令:nohup nodejs server.js?

Where does --be_ip argument come from a command: nohup nodejs server.js?

我现在正在学习如何将我的 node.js 应用程序部署到 Google Compute Engine,并正在阅读有关 Google Cloud Platform 的教程,该教程部署了 node.js 应用程序使用 MongoDB 到 Google 计算引擎。

本教程逐步指导您完成,包括以下内容:

  1. 启动后端实例并使其对 HTTP 端口开放

  2. 在后端安装MongoDB

  3. 启动一个前端实例并使其对 HTTP 端口开放

  4. 在前端安装 nodejs 并在那里克隆 node.js 应用程序,然后启动服务器

但是,本教程的最后一个命令如下:

nohup nodejs server.js nohup nodejs server.js --be_ip XXX --fe_ip YYY &

但我不知道 --be_ip--fe__ip 是从哪里来的。 arguments的参数是一个后端和前端内部IP,所以我很容易猜到这个名字的意思。

但是,man nodejsman nohup 都没有显示这些参数。另外,当我尝试通过关键字“--be_ip --fe_ip command”进行谷歌搜索时,the resultant page shows the google tutorial-related pages specifically.

所以我想知道这些争论从何而来。我怎样才能更多地了解这些论点?

2 个参数用于 server.js。这就解释了 man nodejsman nohup 确实有帮助。您可以在 server.js.

中找到它们

好吧,这是一组可选参数,您可以将其设置为任何您喜欢的值。这些参数应在程序中使用,例如通过 process.argv.optimist 库。

这就是为什么当您用谷歌搜索时,结果页面只是与其相关结果相关的页面,而 man nohupman nodejs 没有帮助。