【问题标题】:Where does --be_ip argument come from a command: nohup nodejs server.js?--be_ip 参数来自哪里的命令:nohup nodejs server.js?
【发布时间】:2016-09-26 00:34:45
【问题描述】:

我现在正在学习如何将我的 node.js 应用部署到 Google Compute Engine,并阅读 Google Cloud Platform 上的教程,该教程将 node.js 应用与 MongoDB 一起部署到 Google Compute Engine。

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

  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

所以我想知道这些论点是从哪里来的。我怎样才能更多地了解这些论点?

【问题讨论】:

    标签: node.js google-compute-engine google-cloud-platform nohup


    【解决方案1】:

    2 个参数用于server.js。这解释了man nodejsman nohup 确实有帮助。你可以在server.js找到他们。

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-05-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多