mars frontend news server
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
- 微信推送抓取文章
- 文章规则添加
- 定时群发
- 授权登录:微信、github
- 管理系统:推送统计,阅读统计、文章再次编辑
GET url: /api/post
query: {
page?: 1,
limit?: 15
}
response: {
error: {
returnCode: 0,
returnMessage: 'success',
returnUserMessage: '成功'
},
data: {
posts: [{
id: 62,
title: '[译] 写给前端开发者的 GraphQL 指南',
description: '',
thumb: '',
url: 'https://zhuanlan.zhihu.com/p/36253316',
user: {
avatar: '',
name: ''
}
}],
pages: {
page: 1, // 当前页
total: 63, // 总数量
limit: 15, // 每页多少条
totalPage: 5 // 总页数
}
}
}
GET url: /api/post/:id
response: {
error: {
returnCode: 0,
returnMessage: 'success',
returnUserMessage: '成功'
},
data: {
id: 62,
title: '[译] 写给前端开发者的 GraphQL 指南',
description: '',
thumb: '',
url: 'https://zhuanlan.zhihu.com/p/36253316',
html: '',
markdown: '',
user: {
avatar: '',
name: ''
}
}
}
GET url: /api/post/view
query: {
id: 12 // 文章id
}
response: {
error: {
returnCode: 0,
returnMessage: 'success',
returnUserMessage: '成功'
},
data: {
views: 12
}
}