Skip to content

This is a simple IP address tracker application built using JavaScript. It allows users to enter an IP address and view its location on a map, along with additional details such as the country, region, city, and ISP.

Notifications You must be signed in to change notification settings

Kelechikizito/ip-address-tracker-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - IP address tracker solution

This is a solution to the IP address tracker challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for each page depending on their device's screen size
  • See hover states for all interactive elements on the page
  • See their own IP address on the map on the initial page load
  • Search for any IP addresses or domains and see the key information and location

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • LeafletJS - JS library for Maps
  • IPAPI - IP address API

What I learned

I learnt how to work with the LeafletJS library.

function getUserIP(api) {
    fetch(api)
    .then(response => response.json())
    .then(data => {
        mapper(data.latitude, data.longitude);
        ipAddress.text(data.ip);
        userLocation.text(`${data.city}, ${data.country_name}`);
        userTimezone.text(`UTC ${data.utc_offset.slice(0,3)}:00`);
        userISP.text(data.org);
    })
    .catch(err => {
        alert(err);
        console.error(err);
    });
}

Continued development

I'd get better at working with external APIs and asynchronous javascript.

Author

About

This is a simple IP address tracker application built using JavaScript. It allows users to enter an IP address and view its location on a map, along with additional details such as the country, region, city, and ISP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published