Skip to content

cgq001/dingdong-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用介绍

1.请在config文件夹下 配置数据库访问地址以及 账户 密码等信息 2.请把SQl文件加下面的SQL语句导入MySQL数据库,以获取各数据表 3.node端口 请在app.js中配置

初始化

cnpm install

启动

nodemon index.js

Token说明

1.token过期时的err值:

{
    "name": "UnauthorizedError",
    "message": "jwt expired",
    "code": "invalid_token",
    "status": 401,
    "inner": {
        "name": "TokenExpiredError",
        "message": "jwt expired",
        "expiredAt": "2017-08-03T10:08:44.000Z"
    }
}

2.token无效时的err值:

{
    "name": "UnauthorizedError",
    "message": "invalid signature",
    "code": "invalid_token",
    "status": 401,
    "inner": {
        "name": "JsonWebTokenError",
        "message": "invalid signature"
    }
}

3.token前端携带

Authorization: Bearer 'xczsxssdshsd.zxjjdjsjdsjdsjsd.djjsjsjsdj'

About

买菜 接口

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published