mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 16:25:54 +01:00
35 lines
576 B
ObjectPascal
35 lines
576 B
ObjectPascal
unit REST.MainController;
|
|
|
|
interface
|
|
|
|
uses
|
|
mvcframework,
|
|
mvcframework.Commons,
|
|
mvcframework.logger,
|
|
generics.collections;
|
|
|
|
type
|
|
|
|
[MVCDoc('')]
|
|
[MVCPath('/api')]
|
|
TMainController = class(TMVCController)
|
|
public
|
|
[MVCPath]
|
|
[MVCHTTPMethod([httpGET])]
|
|
procedure Index;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
System.SysUtils,
|
|
System.StrUtils, System.IOUtils;
|
|
|
|
procedure TMainController.Index;
|
|
begin
|
|
LogD('[TMainController] Index');
|
|
Render('Hello DelphiMVCFramework World (Server is hosted by ' + TPath.GetFileName(GetModuleName(HInstance)) + ')');
|
|
end;
|
|
|
|
end.
|