这个项目灵感来自于 tophubs/TopList
golang version
- flask
- mongodb
- docker
./setup.sh
./bootstrap.sh
-
将会启动
4
个服务service port remark server 5000 flask 服务(目前只做了 知乎
和虎扑
)mongodb 27017 mongo数据库 mongo-express 8081 管理Mongodb web 8080 前端(还在开发)
- types
curl http://106.54.115.166:5000/api/types
{
"code": 0,
"data": [
{
"id": 1,
"title": "知乎"
},
{
"id": 2,
"title": "虎扑"
}
]
}
- list
curl http://106.54.115.166:5000/api/list
# 支持添加从上一个接口拿到的 cate = {id} 参数
# curl http://106.54.115.166:5000/api/list?cate=1
{
"code": 0,
"data": [
{
"_id": "5d8f2ad840d1afb2ab54ddf4",
"cate": 1,
"desc": "Android 现在上到 12GB 内存(RAM)了,是 iPhone6s 的 6 倍,苹果如果上 8GB 那不是一点都不会卡?还是这样慢慢升级让大家买新的?防止用户万年不换机? iPhone 提升内存是否会进一步提升其易用性?如果会,那么 iPhone 为什么不加大内存?",
"title": "iPhone 为什么不加大内存?",
"url": "https://www.zhihu.com/question/276578129"
}
]
}