Turns out I had to sign in to repl.it for the sidebar icon to appear and the code to work.
The documentation (and that error message) might need to reflect this? And/or should databases be available to all users (i.e., those who aren't signed in as well)?
---
Another issue: when going to https://repl.it/repls/HandyNiceBug (providential URL...) ;-) even when signed in, running the code shows the same `REPLIT_DB_URL does not exist` error. If you click the database sidebar icon and any of the 'Insert ->' buttons, then the env seems to update and the code runs successfully.
---
Hopefully useful nitpick: after clicking the 'Insert ->' button once in the db sidebar UI (in the url above), all of the 'Insert ->' buttons stop working.
Aaaand, if I try manually copying any of the code snippets to insert one myself, what's copied into the clipboard is not-the-best. Instead of copying `db["key"] = "value"` for instance, it copies it but with many extra new lines and some bits missing. Might be useful to have a copy-to-clipboard icon? Or do some DOM trickery to allow selection/copy&paste?
Cheers :-)