/internship-chat-2021

Primary LanguageJavaScriptMIT LicenseMIT

.env

PORT=3000
MONGO_URI=mongodb+srv://blablabla.mongodb.net/your_db?retryWrites=true&w=majority
SECRET=some-super-secret-key
GMAIL=your.mail@gmail.com
GPASS=application-password

Send reset password mail

    curl --location --request POST 'localhost:3000/v1/auth/resetPassword' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "email": "test@gmail.com"
    }'

Find User

    curl --location --request GET 'localhost:3000/v1/users/find' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "email": "test@gmail.com"
    }'

Create User

    curl --location --request POST 'localhost:3000/v1/users/create' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "email": "test@gmail.com",
        "fullName": "Test User"
    }'

Update User

    curl --location --request PUT 'localhost:3000/v1/users/update' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "fullName": "Update User"
    }'

Delete User

    curl --location --request DELETE 'localhost:3000/v1/users/delete' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "email": "test@gmail.com"
    }'