Refactor: Move SurrealDB init to /_setup endpoint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 14:46:31 -07:00
co-authored by Claude Opus 5.5
parent f1e894d1bb
commit 21b85acff5
2 changed files with 29 additions and 17 deletions
+2
View File
@@ -186,6 +186,8 @@ Using atomic database transactions over HTTP to track per-IP/per-day search freq
**Note:** This implementation is tested and verified for **SurrealDB v2.3.10**.
After deploying, visit `https://<your-domain>/_setup` once. It creates the `direct_img` namespace, `rate_limit` database, `rate` table and an `updated_at` index (used by the cleanup query). It's idempotent, so visiting again is harmless, and it returns `{"ok":true}` on success.
---
## Stack