Exemple #1
0
        static void Main(string[] args)
        {
            WebHost host = new WebHost();

            host.IsWindowsServices = true;
            WebHost.Title          = "Service Management";
            WebHost.HeaderModel    = "beetlex-process-header";
            WebHost.HomeModel      = "beetlex-process-home";
            WebHost.TabsEnabled    = false;
            host.RegisterComponent <Program>();
            host.RegisterComponent <BeetleX.ServicesProcess.ProcessCenter>();
            host.UseFontawesome();
            host.UseElement(PageStyle.Element);
            host.Setting(o =>
            {
                o.SetDebug();
                o.Port     = 80;
                o.LogLevel = LogType.Info;
            });
            host.Initialize((http, vue, rec) =>
            {
                BeetleX.ServicesProcess.WebController controller = new BeetleX.ServicesProcess.WebController();
                controller.Init(new logHandler(http));
                http.ActionFactory.Register(controller, new BeetleX.FastHttpApi.ControllerAttribute {
                    BaseUrl = "process"
                });
                rec.AddCss("website.css");
                vue.Debug();
            });
            host.Run();
        }