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