feat: update environment configuration, enhance Dockerfiles, and refactor API handling

This commit is contained in:
2025-09-07 19:55:49 +02:00
parent 5f8cf49ec9
commit 08213133be
14 changed files with 53 additions and 56 deletions

View File

@@ -1,22 +0,0 @@
use std::process::Command;
fn touch(file_name: &str) {
if cfg!(target_os = "windows") {
Command::new("cmd")
.args(["/C", &format!("type nul >> {}", file_name)])
.output()
.expect("failed to execute touch");
} else {
Command::new("touch")
.arg(file_name)
.output()
.expect("failed to execute touch");
}
}
pub fn create_dev_db(db_url: &str) {
let prefix = "sqlite://";
if let Some(file_name) = db_url.strip_prefix(prefix) {
touch(file_name);
}
}

View File

@@ -1,6 +1,4 @@
mod db;
mod file;
pub mod testing;
pub use db::migrate;
pub use file::create_dev_db;