Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.58 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.58 KB

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