Mini Program Quick Start
Through this guide, you will learn how to use cloud development in mini programs, including core features such as cloud database, cloud storage, and cloud functions.
📱 WeChat Mini Program
📋 Preparations
Before you begin, ensure you have completed the following preparations:
- Development Tools: Download and install WeChat Developer Tools
- Mini Program Account: Register a WeChat Mini Program, obtain the mini-program's AppID
- Base Library Version: Ensure the mini-program base library version is ≥ 2.2.3
🚀 Step 1: Create a Mini Program Project
Open WeChat Developer Tools and log in by scanning the QR code with WeChat
Create New Mini Program Project: Enter your mini-program AppID
- Select the project storage directory
- Important: Select WeChat Cloud Development for the backend service
- Check to agree to the "Cloud Development Terms of Service"
Select Template: It is recommended to select the "Cloud Development QuickStart" template
☁️ Step 2: Activate Cloud Development Environment
Follow the steps to Activate Cloud Development Environment
💻 Step 3: Initialize CloudBase
Initialize CloudBase in app.js
:
// app.js
App({
onLaunch() {
// Initialize CloudBase
if (!wx.cloud) {
console.error('Please use base library version 2.2.3 or above to enable cloud capabilities');
} else {
wx.cloud.init({
env: 'your-env-id', // Replace with your Environment ID
traceUser: true,
});
}
}
});
🎯 Step 4: Experience CloudBase features
After creating the project, you can experience the following features:
- Cloud Database: Click the "Database" button to experience CRUD operations.
- Cloud Storage: Click the "Storage" button to experience file upload and download.
- Cloud Function: Click the "Cloud Function" button to experience server-side logic invocation.
📚 Deep Dive
- Cloud Database Operations
- Cloud Storage Management
- Cloud Function Development
- WeChat Mini Program Official Documentation
🎮 QQ Mini Program
📋 Preparations
- Development Tools: Download and install QQ Mini Program Developer Tools
- QQ Mini Program Account: Register a QQ Mini Program developer account
- Tencent Cloud account: Must be bound to a Tencent Cloud account.
🚀 Quick Start
Create Project:
- Open QQ Mini Program Developer Tools
- Create a new Mini Program project
- Select Cloud Development Template
Enable CloudBase:
- Access the CloudBase Console via QQ Mini Program IDE
- Follow the prompts to enable the CloudBase environment
Account Binding:
- The system will automatically guide you to complete the binding between your QQ Mini Program account and Tencent Cloud account.
- After binding, you can utilize the full capabilities of CloudBase.
📚 Learning Resources
To facilitate developers using CloudBase in QQ Mini Programs, the system automatically establishes the following binding relationships:
- Create the identity provider "TcbSamlProvider_qq" in Identity Provider
- Create the role "TcbSamlRole_qq" in Role
Important: The above information is essential for using CloudBase in QQ Mini Programs. Please do not delete it.
🔗 Related Resources
Example Project
Development Tools
Learning Documentation
🎉 Start your Mini Program CloudBase journey! Choose the platform that suits you to quickly build powerful mini program applications.