Skip to content
Snippets Groups Projects
Unverified Commit 06a3f9c5 authored by Joel Beckmeyer's avatar Joel Beckmeyer Committed by GitHub
Browse files

make embedded pict-rs port configurable (#3201)

parent 981c1115
No related branches found
No related tags found
No related merge requests found
...@@ -8,9 +8,17 @@ pub async fn main() -> Result<(), LemmyError> { ...@@ -8,9 +8,17 @@ pub async fn main() -> Result<(), LemmyError> {
start_lemmy_server().await?; start_lemmy_server().await?;
#[cfg(feature = "embed-pictrs")] #[cfg(feature = "embed-pictrs")]
{ {
let pictrs_port = &SETTINGS
.pictrs_config()
.unwrap_or_default()
.url
.port()
.unwrap_or(8080);
let pictrs_address = ["127.0.0.1", &pictrs_port.to_string()].join(":");
println!("pictrs_address = {}", pictrs_address);
pict_rs::ConfigSource::memory(serde_json::json!({ pict_rs::ConfigSource::memory(serde_json::json!({
"server": { "server": {
"address": "127.0.0.1:8080" "address": pictrs_address
}, },
"old_db": { "old_db": {
"path": "./pictrs/old" "path": "./pictrs/old"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment