feat(server): create-user CLI + session-store migration on startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 15:07:58 +02:00
parent 642f709bbe
commit dbff95c2a9
6 changed files with 159 additions and 8 deletions
+10 -1
View File
@@ -1,10 +1,11 @@
use clap::Parser;
use server::Config;
const CLEARED: [(&str, Option<&str>); 3] = [
const CLEARED: [(&str, Option<&str>); 4] = [
("DATABASE_URL", None),
("BIND_ADDR", None),
("APP_NAME", None),
("SESSION_COOKIE_SECURE", None),
];
#[test]
@@ -25,3 +26,11 @@ fn database_url_is_required() {
assert!(Config::try_parse_from(["server"]).is_err());
});
}
#[test]
fn cookie_secure_defaults_to_true() {
temp_env::with_vars(CLEARED, || {
let config = Config::try_parse_from(["server", "--database-url", "postgres://x"]).unwrap();
assert!(config.cookie_secure);
});
}