mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +01:00
00d5a9699a
- Now the JSON-RPC executor provides methods to handle HTTP headers for JSON-RPC requests and notifications. - FIX for [issue #141](https://github.com/danieleteti/delphimvcframework/issues/141) - `TDataSetHolder` is a new render that is able to render a dataset with a set of custom metadata (eg `count`,`page` etc). Check [issue #137](https://github.com/danieleteti/delphimvcframework/issues/137)
44 lines
834 B
ObjectPascal
44 lines
834 B
ObjectPascal
unit MainWebModuleUnit;
|
|
|
|
interface
|
|
|
|
uses
|
|
System.SysUtils,
|
|
System.Classes,
|
|
Web.HTTPApp,
|
|
MVCFramework;
|
|
|
|
type
|
|
Twm = class(TWebModule)
|
|
procedure WebModuleCreate(Sender: TObject);
|
|
|
|
private
|
|
MVCEngine: TMVCEngine;
|
|
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
WebModuleClass: TComponentClass = Twm;
|
|
|
|
implementation
|
|
|
|
uses
|
|
WineCellarAppControllerU,
|
|
MVCFramework.Commons,
|
|
System.IOUtils;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Twm.WebModuleCreate(Sender: TObject);
|
|
begin
|
|
MVCEngine := TMVCEngine.Create(self);
|
|
MVCEngine.AddController(TWineCellarApp);
|
|
MVCEngine.Config[TMVCConfigKey.DocumentRoot] := TPath.Combine(AppPath, '..\..\www');
|
|
MVCEngine.Config[TMVCConfigKey.IndexDocument] := 'index.html';
|
|
MVCEngine.Config[TMVCConfigKey.FallbackResource] := 'index.html';
|
|
end;
|
|
|
|
end.
|