cloggo / tangd

A full implementation of tang server running on node.js
MIT License
3 stars 7 forks source link

Empty sqlite database #4

Open zdeneksvarc opened 2 months ago

zdeneksvarc commented 2 months ago

Maybe I am wrong, but first run of tangd creates an empty keys.sqlite3 file, causing key creating / rotation to fail with:

{"code":"Internal","message":"caused by Error: SQLITE_ERROR: no such table: jwk [Change not committed.]"}

To fix this, create the table manually with:

sqlite3 /path/to/keys.sqlite3 "CREATE TABLE IF NOT EXISTS jwk (jwk_id INTEGER PRIMARY KEY, jwk TEXT);"