mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(avatars): add bind_url env variable
This commit is contained in:
parent
299be27031
commit
543522440a
2 changed files with 4 additions and 1 deletions
|
|
@ -59,6 +59,9 @@ pub struct AvatarsConfig {
|
|||
pub s3: S3Config,
|
||||
pub cdn_url: String,
|
||||
|
||||
#[serde(default = "_default_api_addr")]
|
||||
pub bind_addr: String,
|
||||
|
||||
#[serde(default)]
|
||||
pub migrate_worker_count: u32,
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
.route("/stats", get(stats))
|
||||
.with_state(state);
|
||||
|
||||
let host = "0.0.0.0:3000";
|
||||
let host = &config.bind_addr;
|
||||
info!("starting server on {}!", host);
|
||||
let listener = tokio::net::TcpListener::bind(host).await.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue