feat(backend): simple product list API with Ktor
Build Android app / Build (push) Has been cancelled
Build iOS app / Build (push) Has been cancelled
Template Cleanup / Template Cleanup (push) Has been cancelled

This commit is contained in:
xiaobai committed 2026-03-04 17:02:54 +08:00
1 parent 4e10335748
commit 2b51111a04
4 files changed
+122

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
# kmp-mini-shopping backend
一个超轻量 Ktor 后端,用于提供商品列表接口。
## 运行
```bash
cd backend
./gradlew run
```
默认监听:`http://localhost:8080`
## 接口
- `GET /` 服务状态
- `GET /api/health` 健康检查
- `GET /api/products` 商品列表(推荐)
- `GET /products` 商品列表(兼容)
## 返回字段
```json
{
"id": "1",
"title": "KMP 入门课",
"price": 99.0,
"description": "跨平台开发基础课程",
"imageUrl": "https://picsum.photos/seed/kmp1/600/360"
}
```