From 4d7a81dd2542aab1e7b6348e6e059daaa22e7160 Mon Sep 17 00:00:00 2001 From: mStar aka a person <12024604-mstarongitlab@users.noreply.gitlab.com> Date: Mon, 1 Jan 2024 13:38:37 +0000 Subject: [PATCH] Update main --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8382594..13c53c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,8 @@ // See the Licence for the specific language governing permissions and limitations under the Licence. // +use anyhow::Error; + mod objects; mod apis; mod storage; @@ -16,6 +18,8 @@ mod config; mod webui; -fn main() { - let _ = storage::establish_connection("./src/storage/db.sqlite"); +fn main() -> Result<(), Error> { + let conf = config::read_from_env()?; + let _db = storage::establish_connection(&conf.database_path)?; + Ok(()) } \ No newline at end of file