Quick Start
Welcome to CloudBase! This guide is designed to help you get started with cloud development in under 5 minutes and create your first application.
Choose your development scenario
Based on the type of application you want to develop, choose the corresponding Quick Start path:
| Development Scenario | Applicable Scenario | Recommended Tools | Features | Quick Start |
|---|---|---|---|---|
| WeChat Mini Program Development | Developing WeChat Mini Programs | CloudBase Capabilities | • Deep integration with the WeChat ecosystem • Out-of-the-box cloud development capabilities • Supports cloud functions, database, and cloud storage | Start Mini Program Development → |
| Web Application Development | Developing websites, H5 applications, or web applications | Static hosting and backend services of cloud development | • Supports static website hosting • Provides complete backend services • Supports mainstream frameworks like React and Vue | Start Web Development → |
| Mini Game Development | Developing WeChat Mini Games | CloudBase Capabilities | • Provides game server hosting • Supports real-time battle and leaderboard features • High-performance game data storage | Mini Game Development Guide → |
| Hosted Backend Services | Developing API services, data processing services, and scheduled tasks | Cloud Functions, Cloud Run | • Automatic elastic scaling • Pay-as-you-go • Supports multiple programming languages | Backend Service Development → |
| AI Development Tools | Integrating AI capabilities into applications | Cloud Development AI Toolkit | • AI-Powered Development: Automatically generates code and architectural designs • Cloud Development Integration: One-click access to databases, cloud functions, and static hosting • Rapid Deployment: Complete full-stack application deployment in minutes • Full-Stack Support: Web + Mini Programs + backend integration • Intelligent Repair: AI automatically checks logs and fixes issues | AI Development Guide → |
Preparation Before Development
Regardless of which development approach you choose, you need to:
1. Activate Cloud Development Environment
The Cloud Development Environment serves as the backend infrastructure for your applications, encompassing services such as databases, storage, and cloud functions.
2. Install Development Tools (Optional)
If you need to use the command-line tool for development and deployment:
5-Minute Quick Experience
Want to quickly experience the capabilities of cloud development? We've prepared the simplest getting-started sample for you:
💡 Note: Please ensure that you have created a Cloud Development Environment and obtained the Environment ID.
Web Quick Experience
<!DOCTYPE html>
<html>
<head>
<script src="https://static.cloudbase.net/cloudbase-js-sdk/2.17.3/cloudbase.full.js"></script>
</head>
<body>
<h1>Hello CloudBase!</h1>
<script>
// Initialize CloudBase
const app = cloudbase.init({
env: env: 'your-env-id' // Replace with your environment ID
});
// Anonymous Login
const login = async () => {
try {
const auth = app.auth()
await auth.signInAnonymously()
console.log('Login successful!');
const userInfo = await auth.getUserInfo();
alert(`CloudBase connected successfully! \${userInfo.name}`);
} catch (error) {
console.error('Login failed:', error);
}
}
login()
</script>
</body>
</html>
Mini Program Quick Experience
// app.js
App({
onLaunch() {
// Initialize CloudBase
if (!wx.cloud) {
console.error('Please use base library version 2.2.3 or later to utilize cloud capabilities');
} else {
wx.cloud.init({
env: env: 'your environment ID', // Replace with your environment ID
traceUser: true
});
console.log('CloudBase initialization completed');
}
}
});
Related Resources
- Frequently Asked Questions - Solutions to common issues during development
Getting Help
Experiencing issues? We provide multiple support options:
- Developer Community - Communicate with other developers
- Cloud Development Platform - Manage your Cloud Development environment
Are you ready? Choose any path above to start your CloudBase journey!