This site was created with notaku.so! πŸ”₯
Upstash provides a serverless Redis database, which can be used as a key-value store of up to 1mb with a free account.

1. Create an Upstash account

2. Create a database

  1. Click Create database
Image without caption
  1. Name: whatever you want.
  1. Type: Regional
  1. Region: Iowa (us-central1), because it’s closest to Val Town’s servers.
  1. Enable TLS for security.
Image without caption

3. Add REST credentials to Val Town Secrets

  1. Go to val.town/settings/secrets
  1. For UPSTASH_REDIS_REST_URL and the UPSTASH_REDIS_REST_TOKEN each:
    1. Click New secret.
    2. Set the names to upstashURL and upstashToken, respectively
    3. Copy & paste in the value
    4. Click Add
Upstash:
Image without caption
Val Town:
Image without caption

4. Set some data!

If you set it up correctly, you should be able to copy & paste this Val and have it return the same results from your own Upstash database

5. Saving JSON

JSON is automatically stringified and parsed so you can set it and get it directly. You can store a JSON object of up to 1mb this way with a free acount.

6. Further resources

  1. Upstash Redis SDK Docs
  1. Redis tutorial
Thanks to @mattx for contributions to this resource!