【文件属性】:
文件名称:nodejs-auth-jwt:使用JWT进行节点身份验证
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-16 14:48:07
nodejs expressjs jsonwebtoken jwt-authentication JavaScript
nodejs Express JWT
使用JWT登录应用程序示例
运行项目:
$ npm init
$ npm install
$ sudo npm install -g nodemon
$ nodemon
API路线:
get: /api
post: /api/posts
post: /api/login
post: /api/posts
Header: authorization: Bearer < token>
使用邮递员测试api。
【文件预览】:
nodejs-auth-jwt-master
----package.json(531B)
----LICENSE(1KB)
----.gitignore(21B)
----Node-Auth-JWT.postman_collection.json(1KB)
----app.js(1KB)
----README.md(451B)