https://github.com/canfeit/node-api-demo
node api demo
https://github.com/canfeit/node-api-demo
http jwt node restful web
Last synced: about 1 year ago
JSON representation
node api demo
- Host: GitHub
- URL: https://github.com/canfeit/node-api-demo
- Owner: canfeit
- License: mit
- Created: 2019-01-30T10:19:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-31T03:59:28.000Z (about 7 years ago)
- Last Synced: 2025-01-29T10:17:15.055Z (about 1 year ago)
- Topics: http, jwt, node, restful, web
- Language: JavaScript
- Homepage:
- Size: 207 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## node api demo
原生 api 实现简单静态资源响应及登陆/注册/身份认证功能
## 架构
- web 服务:[node http](https://nodejs.org/dist/latest-v11.x/docs/api/http.html)
- 数据库:[MySQL](http://mysql.com)
- 数据库驱动:[mysqljs](https://github.com/mysqljs/mysql)
- 登陆认证:[jwt(node crypto)](https://nodejs.org/dist/latest-v11.x/docs/api/crypto.html)
## 结构
```
node-api-demo/ 原生api实现简单web项目
├── .gitignore git提交忽略清单
├── db.js 数据库连接
├── index.js 服务入口
├── jwt.js jwt实现
├── package.json 项目定义文件
├── README.md 本自述文件
├── router.js 路由设置方式1
├── routes.js 路由设置方式2
├── controller/ 请求处理
│ └── user.js 用户请求处理
├── services/ 业务逻辑层
│ └── user.js 用户业务处理
├── public/ 静态资源
│ ├── favicon.ico 项目Favorites Icon
│ └── index.html 首页
└── node_modules/ 第三方依赖
```