public static void StartTrooServer(ConsoleLogger logger, IRepository repo) { BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultContentRoot)); trooServer = new TrooServer(conf, logger, repo) { HostPrefixes = new HashSet <HostPrefix>(HostPrefix.FromDefaultConfiguration()), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; trooServer.Start(); }
public static void StartGlooServer(ConsoleLogger logger) { BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultContentRoot)); glooServer = new GlooServer(conf, logger, GetArgument("verbose", "Log responses to the console?").IsAffirmative()) { HostPrefixes = new HashSet <HostPrefix>(HostPrefix.FromDefaultConfiguration("localhost", 9100)), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; glooServer.Start(); }
public static void StartVyooServer(ConsoleLogger logger) { DataSettings.Current.SetDefaultDatabaseFor <Session>(out Database userDb); userDb.TryEnsureSchema <Session>(); DataSettings.Current.SetDefaultDatabaseFor <SecureSession>(out Database sessionDb); sessionDb.TryEnsureSchema <SecureSession>(); BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultRoot)); AppConf[] appConfigs = conf.AppConfigs; List <HostPrefix> hostPrefixes = new List <HostPrefix>(HostPrefix.FromDefaultConfiguration("localhost", 7400)); string hostAppMapsFilePath = Path.Combine(conf.ContentRoot, "apps", hostAppMapsFileName); if (File.Exists(hostAppMapsFilePath)) { HostAppMap[] hostAppMaps = HostAppMap.Load(hostAppMapsFilePath); if (Arguments.Contains("apps")) { string[] appNamesToServe = Arguments["apps"].DelimitSplit(",", ";"); appConfigs = conf.AppConfigs.Where(ac => ac.Name.In(appNamesToServe)).ToArray(); hostPrefixes.AddRange(hostAppMaps.Where(ham => ham.AppName.In(appNamesToServe)).Select(ham => new HostPrefix { HostName = ham.Host, Port = 80 }).ToArray()); } else { hostPrefixes.AddRange(HostPrefix.FromHostAppMaps(hostAppMaps)); } } vyooServer = new VyooServer(appConfigs, logger, GetArgument("verbose", "Log responses to the console?").IsAffirmative()) { HostPrefixes = new HashSet <HostPrefix>(hostPrefixes), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; vyooServer.Start(); }