Skip to content

HafeezShuaib/InterestCalculatorAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interest Calculator API

A simple Node.js and Express API for calculating simple and compound interest.

API Features

  • Calculates simple interest and total amount.
  • Calculates compound interest and total amount.
  • Includes input validation for all parameters.
  • Displays final result along side inputs rendered.

Prerequisites

  • Node.js (v18 or higher recommended)
  • npm (Node Package Manager)

Installation

  1. Clone the repository:

    git clone https://github.com/HafeezShuaib/InterestCalculatorAPI.git
    cd InterestCalculatorAPI
  2. Installing dependencies: This will install express, morgan and nodemon as listed in package.json:

    npm install

Running the Application

  • For Development

    This will use nodemon to automatically restart the server when you make changes to the files:

    nodemon app.js

    This will run the application using node:

    node app.js

Once running, the server will be available at http://localhost:3000.

  • API Endpoints

    This API provides two (2) endpoints for calculations:

    POST /api/calculate/simple-interest
    
    POST /api/calculate/compound-interest

For detailed information on request/response formats, please see the full API Documentation.

About

A simple Interest Calculator Api with NodeJs and ExpressJs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors