git_sync
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.
This will not run on val town! You need to run it locally with deno.
- Install Deno: https://docs.deno.com/runtime/manual/getting_started/installation
- Set your val.town api key as an environment variable. https://www.val.town/settings/api
export valtown="abcdefgh-ijkl-mnop-qrst-uvwxyz123456"
- Create a git repo to sync to.
mkdir ./valtown && pushd ./valtown && git init && popd
- Copy down this script and run it, passing the path to your git directory.
deno run -A ./git_sync.ts ./valtown
There is currently no incremental syncing or recovering. You can only use this script against a fresh git repo. If you want to sync to an existing repo, you should create a new repo, run the script and then force push to your existing repo.
This will sync all your vals, including private ones so be careful where you push your git repo if you want those to remain private.
Migrated from folder: tools/git_sync