FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
maxm
maxmipv4-counter
Public
Like
1
ipv4-counter
Home
Code
4
backend
1
frontend
1
README.md
H
index.ts
Branches
1
Pull requests
Remixes
1
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://maxm--383b43462f7311f0a30a569c3dd06744.web.val.run
README.md

IP Visit Counter

A simple website that tracks and displays the number of visits from different IP addresses.

Features

  • Records visits from unique IP addresses
  • Displays a count of visits per IP address
  • Shows total visit count

Project Structure

  • backend/ - Server-side code
    • index.ts - Main HTTP handler using Hono
    • database.ts - SQLite database setup and queries
  • frontend/ - Client-side code
    • index.html - Main webpage

How It Works

When a user visits the site, their IP address is recorded in the SQLite database. If the IP already exists, its visit counter is incremented. The page displays a table of all IP addresses and their visit counts.

HTTP
  • index.ts
    maxm--383b43462f7311f0a30a569c3dd06744.web.val.run
Code
backendfrontendREADME.md
H
index.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.