ghdb
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://begoon--7680005226da11f0a5b3569c3dd06744.web.val.run
This val implements a simple key/value database with GitHub, in a CRUD way.
The key is a file path within a repository. The value is the file content.
The val needs a GitHub token to access the GitHub API, the account name and the repository name.
Also, the val needs GHDB_API_KEY variable. This value defines the exptected value of the GHDB_API_KEY header to allow access to the endpoints.
Endpoints:
- GET /data/path/to/file.ext - read file
- GET /raw/path/to/file.ext - read file from GitHub CDN (10 times faster)
- DELETE /data/path/to/file.ext - delete file
- POST /data/path/to/file.ext - create file
- PUT /data/path/to/file.ext - update/commit file