1 use lemmy_server::{init_logging, start_lemmy_server};
2 use lemmy_utils::{error::LemmyError, settings::SETTINGS};
5 pub async fn main() -> Result<(), LemmyError> {
6 init_logging(&SETTINGS.opentelemetry_url)?;
7 #[cfg(not(feature = "embed-pictrs"))]
8 start_lemmy_server().await?;
9 #[cfg(feature = "embed-pictrs")]
11 let pictrs_port = &SETTINGS
17 let pictrs_address = ["127.0.0.1", &pictrs_port.to_string()].join(":");
18 println!("pictrs_address = {}", pictrs_address);
19 pict_rs::ConfigSource::memory(serde_json::json!({
21 "address": pictrs_address
24 "path": "./pictrs/old"
28 "path": "./pictrs/sled-repo"
32 "path": "./pictrs/files"
36 .expect("initialize pictrs config");
37 let (lemmy, pictrs) = tokio::join!(start_lemmy_server(), pict_rs::run());
39 pictrs.expect("run pictrs");