Skip to content

DentedCode/ft_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finance Tracker API

write about the project ...

Table of Contents

  • Make list of the heading
  • you are ging to create
  • ...

Features

  • list all the features you will have
  • Login is one of them
  • ...

Technologies

  • add technologies you are going to use in this project
  • i.e. Node, etc.

Installation

  1. Write step by step
  2. process how anybody can use this project
  3. ..

Usage

Tell people how they can actually use and test once the system is working

API Endpoints

List all the api Endpoint you are going to have i.e.

  1. Login POST /api/v1/users/login This endpoint is used for authenticating a user by sending their email/username and password.

Request:

  • URL: /api/v1/users/login

  • Method: POST

  • Headers:

    • Content-Type: application/json
  • Body:

    {
        "email": "user@example.com",
        "password": "yourpassword"
    }
  • Response: - Success (200):

    {
    "message": "Login successful",
    "user": "User Info {} with token"
    }
  • Error (401): - Invalid credentials:

        {
        "error": "Invalid email or password"
        }
  • Error (500): Server error:

    {
         "error": "An error occurred while processing the request"
    }

Environment Variables

Create a .env file in the root of your project and add the following environment variables:

# JWT Secret Key
JWT_SECRET=your_jwt_secret

# Token Expiration Time (e.g., '1h', '7d')
JWT_EXPIRES_IN=1h

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors