/express-ts

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

Primary LanguageTypeScript

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"
}

参考