Node.js Express Alexa Ranking of Websites Global Worldwide By Country Wise Full Web App Using alexa-rank-nodejs Deployed to Website 2020

You are currently viewing Node.js Express Alexa Ranking of Websites Global Worldwide By Country Wise Full Web App Using alexa-rank-nodejs Deployed to Website 2020

 

 

Welcome folks today in this tutorial we will be deploying a real web app where we will be making a real life web app in which we will be checking the alexa worldwide rank of websites globally and also countrywise. All the source code of the app is shown below.

 

Get Started

 

 

In order to get started we will be using a node dependency called as alexa-rank-nodejs

 

npm init -y

 

npm i alexa-rank-nodejs is-valid-domain express ejs

 

Now after installing this dependency inside your node.js project

 

Create a express project by creating a index.js file like this and copy paste the following code into it

 

then, run the command node index.js and this is the results

 

 

 

Complete Example

 

 

Now we will build the complete example where we will take the input from the user in the form of website url and then we will show the complete information of that domain including the alexa rank and other relevant information

 

 

Now make a views folder and inside that folder create a alexasiteinfo.ejs file and copy paste the following code to it

 

 

views/alexasiteinfo.ejs

 

 

 

 

Now we need to create index.js file and copy paste the following code which is shown below

 

 

 

 

Screenshot

 

 

 

 

 

 

Live Demo

 

 

You can check out the Live Demo of the Web App Hosted on my Website here:

 

 

Top Global Alexa Websites in World

 

 

Now we will be building the second web service inside which we will be listing top 50 alexa global websites in the world.

 

 

Now create a topalexasites.ejs inside the views folder like this

 

views/topalexasites.ejs

 

 

 

 

 

Now inside the index.js file copy paste the following code

 

 

 

 

 

Screenshot

 

 

 

 

 

 

Live Demo

 

 

You can see the live demo of this web app here at my website

 

 

Top Alexa Websites Country Wise

 

 

Now we will be building web service inside which we will show top 50 alexa websites inside a particular country. We will take the input of the country from the user.

 

 

Now create the file topcountrysites.ejs inside the views folder like this

 

views/topcountrysites.ejs

 

 

 

 

 

And now inside your index.js file copy paste the following code as shown below

 

 

 

 

 

Screenshot

 

 

 

 

 

Live Demo

 

 

You can see the live demo of the web service at my website here

 

 

Leave a Reply