Skip to content

rg85rajat/Lets-call-the-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calling External API

Result Form

Installation

Clone the repository git clone https://github.com/rg85rajat/terriblytinytales.git

Change the directory cd terriblytinytales

Run: node index.js

The server is running at localhost:3000

Defining Code Components

Capture3

Fetching Roll No query from the url (External API) and passing the roll numbers seperated by comma.

split() is used for splitting the Roll Numbers.

Capture

Consists of the form through which values to the API is passed.

Capture

Passed String of Roll Numbers will be displayed in a tabular form

Capture5

Front-End

After Clicking on Submit, Button will change into please wait and depending on the time taken by external API page will ask to wait.

Capture7

Output of the test case: 5,6,9,12,18,20,25,30,32,36,37,38,40,42,45,47,49,50

http://localhost:3000/testAPI?rollNo=5,6,9,12,18,20,25,30,32,36,37,38,40,42,45,47,49,50

Click Directly to view: https://terriblytinytale.herokuapp.com/testAPI?rollNo=5,6,9,12,18,20,25,30,32,36,37,38,40,42,45,47,49,50

Capture4

Output of the testcase: 27

http://localhost:3000/testAPI?rollNo=27

https://terriblytinytale.herokuapp.com/testAPI?rollNo=27

Libraries and Plugins

Node.JS

body-parser

express

node-fetch

nodemon

pug

Hosted on Heroku

Website

https://terriblytinytale.herokuapp.com/

About

Result Form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published