Banana Pie Api Test using ExpressJS and Typescript.
To run this project, clone this project. Ensure you have NodeJs installed on your local machine.
Run npm install
to install all the required dependencies.
Then use npm run dev
to start the project
There are three routes:
-- ...signup [POST]
-- ...login [POST]
-- ...users [GET]
POST /signup
Name | Type | Description |
---|---|---|
String | User email. |
|
password | String | User's password. |
Returns json response of the user
POST /login
Name | Type | Description |
---|---|---|
String | User email. |
|
password | String | User's password. |
Returns json response of the user
Returns Authorization Token, Refresh Token and CSRF token
in cookies,
GET /users
Name | Type | Description |
---|---|---|
String | User email. |
Name | Type | Description |
---|---|---|
_csrf | String | CSRF token from login cookie. |
Returns json response of the user
Returns CSRF token
in cookies,