🍢Rest API with JWT authentication and role based authorization using TypeScript Express.js and TypeORM;Base on https://github.com/andregardi/jwt-express-typeorm
- npm i
- npm start
- npm run migration:run
- 使用postman测试(注意post请求header设置Content-Type :application/json并且body选择raw,参考andregardi/jwt-express-typeorm#3)
- 例如测试登录
// url
post /auth/login
// post body(raw)
{
"username": "admin",
"password": "admin"
}