mirror of
https://github.com/Nutomic/ibis.git
synced 2024-12-23 14:11:23 +00:00
21 lines
673 B
Rust
21 lines
673 B
Rust
#[cfg(feature = "ssr")]
|
|
#[tokio::main]
|
|
pub async fn main() -> ibis::backend::error::MyResult<()> {
|
|
use ibis::backend::config::IbisConfig;
|
|
use log::LevelFilter;
|
|
|
|
if std::env::args().collect::<Vec<_>>().get(1) == Some(&"--print-config".to_string()) {
|
|
println!("{}", doku::to_toml::<IbisConfig>());
|
|
std::process::exit(0);
|
|
}
|
|
|
|
env_logger::builder()
|
|
.filter_level(LevelFilter::Warn)
|
|
.filter_module("activitypub_federation", LevelFilter::Debug)
|
|
.filter_module("ibis", LevelFilter::Debug)
|
|
.init();
|
|
|
|
let ibis_config = IbisConfig::read()?;
|
|
ibis::backend::start(ibis_config, None, None).await?;
|
|
Ok(())
|
|
}
|