diff --git a/samples/htmx/Classes/uData.Model.pas b/samples/htmx/Classes/uData.Model.pas index 92c93411..93903895 100644 --- a/samples/htmx/Classes/uData.Model.pas +++ b/samples/htmx/Classes/uData.Model.pas @@ -32,6 +32,7 @@ TGenre = class(TBaseBO) property Selected: Boolean read FSelected write FSelected; end; + [MVCNameCase(ncAsIs)] TMovie = class(TBaseBO) private FMovieID: Integer; diff --git a/samples/htmx/HTMX_Sample.dpr b/samples/htmx/HTMX_Sample.dpr index 1acc9cde..7ed05463 100644 --- a/samples/htmx/HTMX_Sample.dpr +++ b/samples/htmx/HTMX_Sample.dpr @@ -27,24 +27,15 @@ procedure RunServer(APort: Integer); var LServer: TIdHTTPWebBrokerBridge; begin - Writeln('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); + LogI('** DMVCFramework Server ** build ' + DMVCFRAMEWORK_VERSION); LServer := TIdHTTPWebBrokerBridge.Create(nil); try LServer.OnParseAuthentication := TMVCParseAuthentication.OnParseAuthentication; LServer.DefaultPort := APort; LServer.KeepAlive := True; - - { more info about MaxConnections - http://ww2.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=index.html } - LServer.MaxConnections := 0; - - { more info about ListenQueue - http://ww2.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=index.html } - LServer.ListenQueue := 200; - LServer.Active := True; - WriteLn('Listening on port ', APort); - Write('CTRL+C to shutdown the server'); + LogI('Listening on port ' + APort.ToString); + LogI('CTRL+C to shutdown the server'); WaitForTerminationSignal; EnterInShutdownState; LServer.Active := False; @@ -60,13 +51,16 @@ begin // When MVCSerializeNulls = True empty nullables and nil are serialized as json null. // When MVCSerializeNulls = False empty nullables and nil are not serialized at all. MVCSerializeNulls := True; + UseConsoleLogger := True; try if WebRequestHandler <> nil then WebRequestHandler.WebModuleClass := WebModuleClass; WebRequestHandlerProc.MaxConnections := 1024; - RunServer(8080); + RunServer(dotEnv.Env('dmvc.server.port', 8080)); except on E: Exception do - Writeln(E.ClassName, ': ', E.Message); + begin + LogI(E.ClassName + ': ' + E.Message); + end; end; end. diff --git a/samples/htmx/bin/htmx_templates/header.htmx b/samples/htmx/bin/htmx_templates/header.htmx index 584407a5..396384ef 100644 --- a/samples/htmx/bin/htmx_templates/header.htmx +++ b/samples/htmx/bin/htmx_templates/header.htmx @@ -1,93 +1,97 @@ +
- - - -Welcome to the demo app. Click a tab to continue.
-Welcome to the demo app. Click a tab to continue.
+