use std::sync::Arc;

use plugins::plugin_static::PluginStatic;
use systems::{sys_core::run_server, sys_plugin::PluginManager};

pub mod plugins;
pub mod structs;
pub mod systems;


#[tokio::main]
async fn main() {
    // Create and initialize PluginManager.
    let mut manager = PluginManager::new();
    manager.apply_plugin(Box::new(PluginStatic::new(true, vec!["pdf".into(), "html".into(), "svg".into()])));
    manager.init_plugins().await;
    let manager = Arc::new(manager);

    // Run the server on port 33310.
    run_server(33310, false, manager).await;
}
