• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
mattrossman

mattrossman

geolocation

Public
Like
geolocation
Home
Code
2
README.md
H
main.ts
Branches
1
Pull requests
Remixes
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
main.ts
https://mattrossman--2926a2bc47b811f0a07976b3cceeab13.web.val.run
README.md

geolocation

A helper function to fetch geolocation data from ip-api based on a visitor's IP address

Create val
import { fetchGeolocation } from "https://esm.town/v/mattrossman/geolocation/main.ts"; export default async function (req: Request) { const geolocation = await fetchGeolocation(req); return new Response(`You're visiting from ${geolocation.city}`); }
HTTP
  • main.ts
    mattrossman--29…13.web.val.run
Code
README.md
H
main.ts
FeaturesVersion controlCode intelligenceCLI
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.