public static void Start() { try { PrintHeader(); string configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Configuration.FILENAME); var config = Configuration.Get(configPath); if (config != null) { logger.Info("Configuration file read from '" + configPath + "'"); logger.Info("---------------------------"); // Initialize the Database Configuration if (!Database.Initialize(config.DatabaseConfigurationPath)) { // Throw exception that no configuration file was found var ex = new Exception("No Database Configuration File Found. Exiting TrakHound-AnalyticsServer!"); logger.Error(ex); throw ex; } // Start the Rest Server server = new RestServer(config); server.Start(); started = true; } else { // Throw exception that no configuration file was found var ex = new Exception("No Configuration File Found. Exiting TrakHound-AnalyticsServer!"); logger.Error(ex); throw ex; } } catch (Exception ex) { logger.Error(ex); } }