- Node.js + TypeScript
- Authentication/Authorization via JWT
- MongoDB
https://enigmatic-mountain-35900.herokuapp.com
Returns json data with stats by country.
- URL
/stats
- Method:
GET
- Headers:
Authorization: <string> ('Bearer <token>')
- Response:
[{
name: <string>,
totalCases: <string>
totaDeaths: <string>
}]
Logs in user via login & password, response with accessToken and refreshToken
- URL
/login
- Method:
POST
- Body:
{
login: <string>,
password: <string>
}
- Response:
{
accessToken: <string>,
refreshToken: <string>
}
Signs up with login & password provided
- URL
/signup
- Method:
POST
- Body:
{
login: <string>,
password: <string>
}
Uses refresh token to get new authorization token
- URL
/token
- Method:
POST
- Body:
{
"token": "<string>"
}
Logs user out
- URL
/signup
- Method:
DELETE
- Body:
{
"token": "<string>"
}