• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
Jamesllllllllll

Jamesllllllllll

like-anything

Add a "Like" button anywhere on the web
Remix of maxm/ipv4-counter
Public
Like
like-anything
Home
Code
9
.claude
1
backend
1
frontend
1
.vtignore
CLAUDE.md
PAGE_LIKES_DOCUMENTATION.md
README.md
deno.json
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
1
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
/
README.md
Code
/
README.md
Search
8/10/2025
Viewing readonly version of main branch: v25
View latest version
README.md

Likes Tracking API

A cross-origin API service that tracks likes across multiple websites.

Features

  • Records likes for websites and specific pages
  • Supports multiple websites from a single API
  • Returns updated like counts for real-time UI updates
  • CORS enabled for cross-origin requests

API Endpoints

POST /api/like

Record a like for a website/page:

{ "website": "example.com", "pageUrl": "/blog/my-post" // optional }

Returns: { "success": true, "website": "example.com", "pageUrl": "/blog/my-post", "likeCount": 42 }

GET /api/likes/:website

Get like count for a specific website. Add ?pageUrl=/path for specific pages.

GET /api/likes

Get all like data for admin/stats purposes.

Project Structure

  • backend/ - Server-side code
    • database.ts - SQLite database setup and queries for likes tracking
  • index.ts - Main HTTP handler using Hono with CORS support

Example Usage

// Record a like from your website fetch("https://your-val-url.val.run/api/like", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ website: "mysite.com", pageUrl: window.location.pathname, }), }) .then((res) => res.json()) .then((data) => { // Update your UI with data.likeCount document.getElementById("like-count").textContent = data.likeCount; });
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.