Development Notes
Programming Language Support
- Runtime Support
- Release Notes
Regular Cloud Function
| Language | Version | Recommended Scenarios | Features |
|---|---|---|---|
| Node.js | 20.19, 18.15, 16.13 | Web APIs, data processing | Rich ecosystem, high development efficiency |
| Python | 3.10, 3.9, 3.7 | Data analysis, AI/ML | Rich scientific computing libraries |
| PHP | 8.0, 7.4 | Web development, CMS | Traditional strengths in Web development |
| Go | Latest version | High-performance services, system tools | Excellent performance, strong concurrency capabilities |
| Java | 11 (Kona JDK) | Enterprise applications, big data | Mature ecosystem, stable performance |
HTTP cloud function
| Language | Version | Recommended Framework | Applicable Scenarios |
|---|---|---|---|
| Node.js | 20.19, 18.15, 16.13 | Express, NestJS, Next.js | Full-stack applications, API services |
| Python | 3.10, 3.9, 3.7 | Django, Flask, FastAPI | Web applications, data APIs |
| PHP | 8.0, 7.4 | Laravel, Symfony | Traditional Web applications |
| Go | Latest version | Gin, Echo, Fiber | High-performance API services |
| Java | 11 (Kona JDK) | Spring Boot, Quarkus | Enterprise-level Web services |
Node.js Version Features
Node.js 20.19 (Recommended)
- Latest LTS version, best performance and security
- Supports the latest JavaScript features
- Better memory management and startup performance
Node.js 18.15
- Stable LTS version
- Extensive ecosystem support
- Suitable for production environments
Node.js 16.13
- Older LTS version
- Use when compatibility considerations are required
Python Version Features
Python 3.10 (Recommended)
- Supports structured pattern matching
- Better error messages
- Performance optimization
Python 3.9
- Dictionary merge operator
- Type hint improvements
- Stable and reliable
Python 3.7
- Complete basic features
- Use when compatibility considerations are required
Development Environment Preparation
Local Development Environment
Node.js Development Environment
# Install Node.js (recommend using nvm to manage versions)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20.19.0
nvm use 20.19.0
# Verify installation
node --version
npm --version
Python Development Environment
# Install Python (recommend using pyenv to manage versions)
curl https://pyenv.run | bash
pyenv install 3.10.0
pyenv global 3.10.0
# Create a Virtual Environment
python -m venv cloudbase-env
source cloudbase-env/bin/activate # Linux/macOS
# cloudbase-env\Scripts\activate # Windows
# Verify installation
python --version
pip --version
Related Resources
Development Tools
- CloudBase CLI - command-line tool
- CloudBase SDK - server-side SDK
Through this guide, you should have learned the core concepts and best practices of CloudBase cloud function development. It is recommended to start with simple examples to gradually master the development and deployment process of cloud functions.