设置开发环境
要设置环境以便在 Node.js 中进行开发,请执行以下操作:
安装最新版本的 Node.js。
如需查看受支持的版本列表,请参阅 Node.js 运行时;如需了解如何使用其他 Node.js 版本,请参阅自定义运行时。
安装并初始化 gcloud CLI 以部署和管理您的应用。如果您已安装并初始化 gcloud CLI,请运行 gcloud components update
命令以更新至最新版本。
下载 App Engine 版 gcloud CLI 即表示您同意遵守其使用条款。
要访问 GitHub 中的代码、样本、库和工具,请安装 Git:
安装 Git
npm软件包管理器通常会与 Node.js 一起安装,但您也可以选择安装Yarn 软件包管理器。
如要轻松管理 Node.js 和 npm 的安装,请安装 Node Version Manager (nvm):
安装 nvm
如果您使用的是 Windows,请参阅 nvm-windows。
安装首选工具或框架,例如,您可以使用 Express.js 框架。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-03-29 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或示例代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]