Skip to main content

Quick Start

Preparations

  1. Have a Tencent Cloud account
  2. Create a CloudBase environment and obtain the Environment ID
  3. Install Node.js
  4. Install Cloudbase CLI

Step 1: Enable Static Website Hosting

Log in to the CloudBase console, go to the Static Website Hosting page, and click the Get Started button to enable static website hosting.

Note
  • Activation process takes about 1-3 minutes;
  • Currently, only pay-as-you-go environments support enabling static hosting.

Step 2: Write a Simple HTML

Next, we create a simple HTML file named index.html:

<html>
<head>
<meta charset="utf-8" />
</head>
<body>
Hello Cloudbase!
</body>
</html>

Step 3: Deploy Static Files to CloudBase

Next, we run the command to deploy index.html to CloudBase's static hosting service:

cloudbase hosting deploy index.html
Note

Before running cloudbase hosting deploy, log in to the CLI tool:

cloudbase login

You can then use <envId>-<instanceId>.tcloudbaseapp.com to access this page, where <envId> and <instanceId> are the identifiers of your CloudBase environment.