Skip to content

platevoltage/Visitor-Profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visitor-Profiler

A simple node app that collects header data from visitors, and gets the location of the visitors with API call to https://ipdata.co via Axios.

Screenshot 2022-11-06 at 5 54 57 PM

Installation

  • Visit https://visitor-tracker.home.jgarrettcorbin.com/hit for a demo.

  • Clone this repository git clone <repo address>

  • Move into cloned directory cd Visitor-Tracker

  • Install dependencies npm install

  • Set up environment variables by renaming .env.EXAMPLE to .env and adding your mySQL username and password.

  • Register an API key at https://ipdata.co and paste that key in the .env file beside API_KEY.

  • Add new database to mySQL CREATE DATABASE visitor_db;

  • Start server npm start

  • Navigate to http://localhost:3004/stats (port can be changed in the .env file)

  • Create a link or fetch/axios/ajax request to http://localhost:3004/hit to record the IP of the visitor.

Deployed link

https://visitor-tracker.home.jgarrettcorbin.com/hit

Built With

Authors

Garrett Corbin

License

This project is licensed under The MIT license

About

A simple node app that collects header data from visitors, and gets the location of the visitors with an axios API call.

Topics

Resources

License

Stars

Watchers

Forks

Contributors