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

chadparker

cp-root

Public
Like
cp-root
Home
Code
11
.townie
1
README.md
H
endpoints-adapting.tsx
endpoints-townie-try.tsx
H
endpoints-vt-sdk.tsx
H
index.tsx
H
old-get_vals_endpoints.tsx
H
old-scan-vals.tsx
H
read-vals.tsx
H
val-files.tsx
H
vals-list.tsx
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
6/3/2025
Viewing readonly version of main branch: v171
View latest version
README.md

cp-root router

status:

  • fetch my vals
  • loop through vals
  • look at each val's file list to find endpoints.tsx
  • refine the filtering
    • only one filter: find endpoints.* where * could be js, jsx, ts, tsx
  • read each matching val's endpoints file
  • refactor into helper functions for better maintainability
  • order functions to make sense
  • format output
  • fetch it from cloudflare
  • save to db or kv store
  • implement cache invalidation
  • manual refresh endpoint

plan:

this will loop through all of my vals, collecting the ones with endpoints.tsx, and updating something somewhere, I'm not sure what yet.

if this pushes to somewhere else make sure to store the secret location in an env var.

but it would be better to pull from elsewhere when needed, with some intelligent caching.

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.