2024-01-03 16:06:52 +00:00
|
|
|
#[cfg(feature = "ssr")]
|
2024-01-03 12:29:25 +00:00
|
|
|
#[tokio::main]
|
2024-10-28 14:46:51 +00:00
|
|
|
pub async fn main() -> ibis::backend::error::MyResult<()> {
|
|
|
|
use ibis::backend::config::IbisConfig;
|
2024-01-03 12:29:25 +00:00
|
|
|
use log::LevelFilter;
|
2024-02-07 15:54:43 +00:00
|
|
|
|
|
|
|
if std::env::args().collect::<Vec<_>>().get(1) == Some(&"--print-config".to_string()) {
|
|
|
|
println!("{}", doku::to_toml::<IbisConfig>());
|
|
|
|
std::process::exit(0);
|
|
|
|
}
|
|
|
|
|
2024-01-03 12:29:25 +00:00
|
|
|
env_logger::builder()
|
|
|
|
.filter_level(LevelFilter::Warn)
|
2024-03-12 09:51:32 +00:00
|
|
|
.filter_module("activitypub_federation", LevelFilter::Debug)
|
|
|
|
.filter_module("ibis", LevelFilter::Debug)
|
2024-01-03 12:29:25 +00:00
|
|
|
.init();
|
2024-02-07 15:54:43 +00:00
|
|
|
|
2024-02-27 16:49:36 +00:00
|
|
|
let ibis_config = IbisConfig::read()?;
|
2024-12-05 11:07:20 +00:00
|
|
|
ibis::backend::start(ibis_config, None, None).await?;
|
2024-01-03 12:29:25 +00:00
|
|
|
Ok(())
|
2024-01-03 16:06:52 +00:00
|
|
|
}
|