96 Star 528 Fork 161

ecitlm / Node-SpliderApi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Express

项目基于express+sequelize+mysql+express-validator 基于node+express爬虫 API接口项目,包括全国高校信息、成语诗歌、星座运势、历史的今天、音乐数据接口、图片壁纸、搞笑视频、热点新闻资讯 详情接口数据

  • express
  • sequelize
  • mysql
  • express-validator参数表单校验
  • 使用cheerio解析爬虫页面
  • 集成ejs模板
  • 集成swaggerUI接口文档
  • nodemon项目开发动态热更新
  • dotenv管理配置系统参数
  • 包含接口sign请求验证
  • log4js 错误日志收集

环境要求

需要安装node环境,mysql数据库

部署运行

$ git clone https://github.com/ecitlm/Node-SpliderApi.git
$ npm install
#  start project dev
$ npm run dev
# starting prd
$ npm run prd
#localhost:3001

服务器部署

在服务器中使用 pm2node 服务进行进程守护

#启动进程/应用
pm2 start npm --watch --name tools -- run prd
pm2 restart tools
pm2 stop tools
pm2 delete tools

数据库

mysql中包含、唐诗300、成语、历史的今天、星座运势(聚合平台数据-需要申请自己的APPCODE)、用户表等数据 项目目录bak-file文件夹可查看

接口文档

启动项目之后http://localhost:3001/api-docs/ 可查看接口文档页面 api.png api2.png

错误码说明

状态码 含义 备注
200 响应正常
1001 参数无效、如一个不存在的id
1002 参数为空、验证不通过、参数类型错误
1003 请求签名异常、非法
404 请求不存在
405 请求方式错误
9999 第三方接口请求异常
500 系统异常
The MIT License (MIT) Copyright (c) 2018 ecitlm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于node+express爬虫 API接口项目,包括全国高校信息、成语诗歌、星座运势、历史的今天、音乐数据接口、图片壁纸、搞笑视频、热点新闻资讯 详情接口数据 展开 收起
NodeJS 等 2 种语言
MIT
取消

发行版 (1)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
NodeJS
1
https://gitee.com/ecitlm/splider.git
git@gitee.com:ecitlm/splider.git
ecitlm
splider
Node-SpliderApi
master

搜索帮助

14c37bed 8189591 565d56ea 8189591