diesel working
This commit is contained in:
@ -1,25 +1,27 @@
|
||||
#[cfg(feature = "server")]
|
||||
pub struct ServerConfig {
|
||||
pub upload_folder: String,
|
||||
pub db_url: String,
|
||||
}
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
impl ServerConfig {
|
||||
pub fn load() -> Self {
|
||||
Self {
|
||||
upload_folder: "./test/".to_string()
|
||||
upload_folder: "./test/".to_string(),
|
||||
db_url: std::env::var("DATABASE_URL").expect("missing DATABASE_URL"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ClientConfig {
|
||||
pub upload_max_size: usize
|
||||
pub upload_max_size: usize,
|
||||
}
|
||||
|
||||
impl ClientConfig {
|
||||
pub fn load () -> Self {
|
||||
pub fn load() -> Self {
|
||||
Self {
|
||||
upload_max_size: 1024 * 1024 * 1024 * 1 //1GB for testing
|
||||
upload_max_size: 1024 * 1024 * 1024 * 1, //1GB for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user