public static BamServer Serve(string contentRoot) { BamConf conf = BamConf.Load(contentRoot); BamServer server = new BamServer(conf); server.Start(); return(server); }
/// <summary> /// Loads the server configuration from either a json file, yaml file /// or the default config depending on which is found first in that /// order. /// </summary> public BamConf LoadConf() { OnLoadingConf(); BamConf conf = BamConf.Load(ContentRoot); SetConf(conf); OnLoadedConf(conf); return(conf); }
public ContentResponder(ILogger logger, ITemplateManager templateManager = null) : this(BamConf.Load(), logger, templateManager) { }