Deploy Spring Boot and Express on Alibaba Cloud Serverless in 60 Minutes
This guide walks beginners through the concepts, advantages, and practical steps of using Alibaba Cloud Function Compute to deploy popular web frameworks like Spring Boot and Express, create a custom Web IDE, and configure domains, while highlighting serverless architecture benefits and cost considerations.
Overview
The article introduces Serverless (Function Compute) as an event‑driven, fully managed cloud model that abstracts away servers, offering elastic scaling, high availability, and pay‑as‑you‑go pricing. It explains the relationship between Serverless, Function Compute, and broader cloud‑native architectures.
Learning Objectives
Understand Serverless concepts and architecture.
Familiarize with Alibaba Cloud Function Compute product.
Deploy popular web frameworks (Spring Boot, Express) on the Function Compute platform.
Use the Serverless Devs client for local deployment.
Build a custom Web IDE application.
Prerequisites
Basic difficulty (introductory level).
Own Alibaba Cloud account.
Approximately 60 minutes of time.
Serverless Fundamentals
Serverless emphasizes a development focus on business logic rather than infrastructure. The core of Serverless is Function Compute, an event‑driven, fully managed service that automatically provisions resources, scales elastically, and provides built‑in high availability.
Key Advantages
Zero Operations : No need to manage servers or processes.
Elastic Scaling : Automatic scaling from zero to unlimited instances based on load.
Pay‑Per‑Use : Costs align with actual usage.
High Availability : Built‑in redundancy.
State can be persisted via external services such as Redis, OSS, or databases.
Alibaba Cloud Function Compute Features
The console shows service and function management, monitoring, domain binding, elastic management, and layer support. Custom domains can be bound to HTTP‑triggered functions, and elastic management allows configuring maximum and minimum instance counts to control costs and cold‑start behavior.
Deploying Spring Boot
Log in to Alibaba Cloud and open the Function Compute console.
Navigate to Application → Create via Template → Spring Boot and follow the wizard.
Accept default service name, create the application, and wait for the framework to be generated.
Access the automatically assigned sub‑domain to view the deployed homepage.
Review deployment logs and explore the generated service and function details.
All steps are illustrated with screenshots (omitted here for brevity).
Deploying Express (Node.js) TodoList
Install Node.js (download from https://nodejs.org/zh-cn) and verify with node -v.
Install Serverless Devs client globally: npm install @serverless-devs/s -g.
Configure Alibaba Cloud credentials using s config add and follow the prompts.
Initialize the TodoList template: s init todolist-app -d todolist-app.
Deploy the project: cd todolist-app && s deploy. The console displays the generated domain and HTTP trigger.
Visit the domain to see the running TodoList app; re‑deploy after code changes.
Creating a Custom Web IDE
Select the official serverless vscode webide template and create the application.
Create an OSS bucket (e.g., webidepractise) to store user data; the bucket must reside in the same region as the function.
Bind the OSS bucket to the application during creation.
Configure the function’s domain and, if desired, bind a custom domain via Alibaba Cloud DNS (CNAME record pointing to the function’s public domain).
The resulting Web IDE provides an online VS Code‑like environment powered by the open‑source openvscode‑server project, written in Go.
Summary and Reflection
The guide covers the full lifecycle: understanding Serverless concepts, exploring Function Compute features, deploying Spring Boot and Express applications, and building a custom Web IDE. Readers are encouraged to experiment, delete resources after learning to avoid charges, and consider migrating their own products to Serverless.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Native
We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
