https://github.com/dlyt/jnode
A simple Node/Express/Sequelize API
https://github.com/dlyt/jnode
Last synced: 12 months ago
JSON representation
A simple Node/Express/Sequelize API
- Host: GitHub
- URL: https://github.com/dlyt/jnode
- Owner: dlyt
- Created: 2016-12-21T08:51:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-27T01:37:09.000Z (over 9 years ago)
- Last Synced: 2025-03-11T07:48:24.837Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 208 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
1. Clone the repository: git clone https://github.com/dlyt/JNode.git
* Install the application: `npm install`
* Place your own Mysql URI in conf/db.js and models/index.js
* Start the server: `npm start`
* View in browser at http://localhost:3000
* test: `npm test`
## API示例
### 请求url:
* http://localhost:3000/api/city
### 请求方式:
* POST
### 参数:
| 参数名 | 必选 | 类型 | 说明 |
|:-------------:|:-------------|:-------------|:-------------|
| city | true | string | 城市名称 |
### 返回示例
```
{
"code": "0",
"msg": "请求成功",
"value": 23
}
```
### 返回参数说明
| 参数名| 类型 | 说明 |
|:-------------:|:-------------|:-------------|
| code | int | 0: 表示请求成功, 1: 表示请求失败 |
| value | int | 城市ID |