use ipfs_api::IpfsClient;
use std::io::Cursor;
#[cfg_attr(feature = "actix", actix_rt::main)]
#[cfg_attr(feature = "hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");
let client = IpfsClient::default();
let default_config = include_str!("default_config.json");
match client.config_replace(Cursor::new(default_config)).await {
Ok(_) => eprintln!("replaced config file"),
Err(e) => eprintln!("error replacing config file: {}", e),
}
}