Public
Like
cp-root
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.
Viewing readonly version of main branch: v214View latest version
- 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
- refactor vals-all-files to use exported fetchValFiles function from val-files
- format output
- fetch it from cloudflare
- save to db or kv store
- implement cache invalidation
- manual refresh endpoint
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.
vals-list.tsx- ExportsfetchVals()function to get list of all valsval-files.tsx- ExportsfetchValFiles()function to get files for a specific valvals-all-files.tsx- Uses both exported functions to get all vals with their files