Esempio n. 1
0
        public static BamServer Serve(string contentRoot)
        {
            BamConf   conf   = BamConf.Load(contentRoot);
            BamServer server = new BamServer(conf);

            server.Start();
            return(server);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
 public ContentResponder(ILogger logger, ITemplateManager templateManager = null) : this(BamConf.Load(), logger, templateManager)
 {
 }