feat: switch Dioxus to fullstack, add a form for creating a project

This commit is contained in:
Matouš Volf
2024-08-17 00:30:17 +02:00
parent 6b13e56840
commit 97c9779170
13 changed files with 944 additions and 50 deletions

View File

@ -0,0 +1,12 @@
use diesel::pg::PgConnection;
use diesel::prelude::*;
use dotenvy::dotenv;
use std::env;
pub(crate) fn establish_database_connection() -> PgConnection {
dotenv().ok();
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
PgConnection::establish(&database_url)
.unwrap_or_else(|_| panic!("error connecting to {}", database_url))
}