Node.js Express Cricket Live Statistics App in Javascript Using ESPN Cricinfo API Project For Absolute Beginners 2020

You are currently viewing Node.js Express Cricket Live Statistics App in Javascript Using ESPN Cricinfo API Project For Absolute Beginners 2020

 

 

 

Get Started

 

 

In order to get started we need to install the following dependencies which are as follows:

 

npm init -y

 

This will initialize a package.json file for your app which contains the basic information about the app.

 

npm i express

npm i ejs

npm i request

npm i cric-player-info

 

 

Screenshots

 

 

 

 

 

 

 

 

 

Live Demo

 

 

You can see the live demo of the app here

 

 

 

 

Building the App

 

 

 

Now to build the app we need to create the index.js file and copy paste the following code to start the express server

 

 

 

 

 

 

Now we need to create the views folder and inside this we need to create a file called as index.ejs and copy paste the following code

 

 

views/index.ejs

 

 

 

 

 

So now after this we need to inject the player names when the user types inside the input field making a autocomplete suggestion field. For this we will be making use of AJAX and we will be making several ajax calls to the express server

 

 

 

 

 

DOWNLOAD SOURCE CODE

 

Leave a Reply