With this simple app you can send email and password req and create a token when auth. You can verify the token and return user id from db.
- TypeScript.
- Postgres with TypeORM.
- JWT, Bcrypt.
/users
# post
{
  "email": "[email protected]",
  "password": "password"
}
# return
{
  "email": "[email protected]",
  "password": "password",
  "id": "id"
}/login
# post
{
  "email": "[email protected]",
  "password": "123456"
}
# return
"(jwt token)"/users
# get | Bearer Token -> JWT Token
# return
{
  "userID": "(userId)"
}