Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryanadamss/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
https://github.com/bryanadamss/express-ts
express rest restapi ts typeorm typescript
Last synced: 4 days ago
JSON representation
🍢Rest API with JWT authentication and role based authorization using TypeScript Express.js and TypeORM;Fork on https://github.com/andregardi/jwt-express-typeorm
- Host: GitHub
- URL: https://github.com/bryanadamss/express-ts
- Owner: BryanAdamss
- Created: 2019-09-12T06:01:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T22:22:07.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T18:25:47.788Z (about 2 months ago)
- Topics: express, rest, restapi, ts, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 202 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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,参考https://github.com/andregardi/jwt-express-typeorm/issues/3)
5. 例如测试登录
```
// url
post /auth/login
// post body(raw)
{
"username": "admin",
"password": "admin"
}
```## 参考
- 项目:https://github.com/andregardi/jwt-express-typeorm?source=post_page-----fbfa3cab22a4----------------------
- 文章:https://medium.com/javascript-in-plain-english/creating-a-rest-api-with-jwt-authentication-and-role-based-authorization-using-typescript-fbfa3cab22a4