Skip to content

do-once/starter-express-restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-ts

🍢Rest API with JWT authentication and role based authorization using TypeScript Express.js and TypeORM;Base on https://github.com/andregardi/jwt-express-typeorm

开始

  1. npm i
  2. npm start
  3. npm run migration:run
  4. 使用postman测试(注意post请求header设置Content-Type :application/json并且body选择raw,参考andregardi/jwt-express-typeorm#3)
  5. 例如测试登录
// url
post /auth/login
  
// post body(raw)
{
"username": "admin",
"password": "admin"
}

参考

About

使用TypeScript、Express.js和TypeORM,实现具有JWT(JSON Web Tokens)身份验证和基于角色授权功能的REST API。 🍢Rest API with JWT authentication and role based authorization using TypeScript Express.js and TypeORM;Fork on https://github.com/andregardi/jwt-express-typeorm

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors