Clickstat is a URL shortener with IP and GPS logging. It logs information like IP address User-Agent and GPS-Coordinates if GPS Tracking is enabled. Access it at clickstat.xyz
- IP Logging
- User-Agent Logging
- GPS Loggin
- IP lookup
steps:
- Setup PostgreSQL
- Get API token from ipinfo.io
- Set Environment Variables
- Install Requirements
- Run main.py
Install PostgreSQL and Collect the collect/set your database credentials
This Flask app uses the ipinfo.io API. Get your API token from here..
The flask app collects the API and database credentials from your Environment Variables. To set the Variables, add the following lines to your .bashrc or .zshrc file
# Databse Creds
export PGPASSWORD='your_database_password'
export PGHOST='your_host'
export PGUSER='your_username'
export PGPORT='your_port_number'
export PGDATABASE='your_database_name'
# API token
export API_TOKEN='your ipinfo.io api token'
Make sure to replace accordingly with the actual credentials. After adding these lines, source the file by
source .bashrc
or by
source .zshrc
if you're using zsh.
Now it's time to install the Requirements. Go to the clickstat directory and type,
pip install -r requirements.txt
Everything is set-up! Now just run the main.py file with python3.