pub fn new() -> Self {
        let config_dir = dirs::config_dir().unwrap();
        let config_file = config_dir.join("config.toml");
        external::ansi::enable_ansi_support().unwrap();

        let config = Config {
            host_port: 8000,
            name: String::from("surge"),
            storage_port: 8080,
        };
        App {
            config_dir,
            config_file,
            config,
        }
    }
/// creates a new instance of App
/// and then loads the config file
creates a new instance of App
and then loads the config file
creates a new instance of App and then loads the config file
pub fn new() -> Self {
        let config_dir = dirs::config_dir().unwrap();
        let config_file = config_dir.join("config.toml");
        external::ansi::enable_ansi_support().unwrap();
        let config = Config {
            host_port: 8000,
            name: String::from("surge"),
            storage_port: 8080,
        };
        App {
            config_dir,
            config_file,
            config,
        }
    }
pub fn new ( ) -> Self { let config_dir = dirs :: config_dir ( ) . unwrap ( ) ; let config_file = config_dir . join ( " " ) ; external :: ansi :: enable_ansi_support ( ) . unwrap ( ) ; let config = Config { host_port : 8000 , name : String :: from ( " " ) , storage_port : 8080 , } ; App { config_dir , config_file , config , } }
creates a new instance of App
and then loads the config file
creates a new instance of App and then loads the config file