writeFileEndpoint
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.
main.tsx
https://omgwtfbrblolttyl--75141a64279d11f09d52569c3dd06744.web.val.run
- get token from header
- decode using secret from env
- look up globs for user with id from token
- get path from req.body
- test path against all globs for user
- if none pass, 403 with message
- if any pass, write val to db with path as key (overwrite if exists)
- return new value
Migrated from folder: fs/writeFileEndpoint