如要在 App Engine 上部署應用程式,您必須建立 Google Cloud 專案,這是頂層容器,可存放 App Engine 應用程式資源和其他 Google Cloud 資源。
在這項工作中,您會建立 Google Cloud 專案和 App Engine 應用程式,以儲存應用程式的設定、運算資源、憑證和中繼資料。
如果您已經有啟用 App Engine 和 Cloud Build API 的專案,請繼續撰寫網路服務。 Google Cloud
建立 Google Cloud 專案
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
 - 
    
    
      
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
 - 
      Create a project: To create a project, you need the Project Creator
      (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles. 
 - 
  
    
Verify that billing is enabled for your Google Cloud project.
 - 
  
  
    
      
Enable the Cloud Build API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles. - 
      
Install the Google Cloud CLI.
 - 
          
如果您使用外部識別資訊提供者 (IdP),請先 使用聯合身分登入 gcloud CLI。
 - 
        
如要初始化 gcloud CLI,請執行下列指令:
gcloud init - 
    
    
      
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
 - 
      Create a project: To create a project, you need the Project Creator
      (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles. 
 - 
  
    
Verify that billing is enabled for your Google Cloud project.
 - 
  
  
    
      
Enable the Cloud Build API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles. - 
      
Install the Google Cloud CLI.
 - 
          
如果您使用外部識別資訊提供者 (IdP),請先 使用聯合身分登入 gcloud CLI。
 - 
        
如要初始化 gcloud CLI,請執行下列指令:
gcloud init 在 Google Cloud 控制台中,為 Google Cloud 專案建立 App Engine 應用程式。
選取應用程式運算資源的目標地區。
- 由於新專案中 Cloud Build 使用服務帳戶的預設行為有所變更,以及預設安全機構政策異動,您可能需要將額外角色授予部署服務帳戶。如要進一步瞭解如何授予特定角色,請參閱疑難排解指南。
 
後續步驟
現在您已設定好 Google Cloud 專案了,可以開始使用 Node.js 編寫基本網路服務。