/bananapie

Primary LanguageTypeScript

Banana Pie Api Test using ExpressJS and Typescript.

Installing

To run this project, clone this project. Ensure you have NodeJs installed on your local machine.

Usage

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]

Sign Up

POST /signup

Body Parameters

Name Type Description
email String

User email.

password String

User's password.

Returns json response of the user

Login

POST /login

Body Parameters

Name Type Description
email 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 User

GET /users

QUERY Parameters

Name Type Description
email String

User email.

Body Parameters

Name Type Description
_csrf String

CSRF token from login cookie.

Returns json response of the user Returns CSRF token in cookies,