mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +01:00
FIX in Sample
This commit is contained in:
parent
7ca59a3b88
commit
d9b1531aa7
@ -103,7 +103,7 @@ end;
|
|||||||
|
|
||||||
procedure TSampleController.Index(Ctx: TWebContext);
|
procedure TSampleController.Index(Ctx: TWebContext);
|
||||||
begin
|
begin
|
||||||
Redirect('/customers');
|
Redirect('/index.html');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSampleController.NewCustomer(Ctx: TWebContext);
|
procedure TSampleController.NewCustomer(Ctx: TWebContext);
|
||||||
|
@ -5,6 +5,7 @@ program serversideviews;
|
|||||||
uses
|
uses
|
||||||
System.SysUtils,
|
System.SysUtils,
|
||||||
Winapi.Windows,
|
Winapi.Windows,
|
||||||
|
Winapi.ShellAPI,
|
||||||
IdHTTPWebBrokerBridge,
|
IdHTTPWebBrokerBridge,
|
||||||
Web.WebReq,
|
Web.WebReq,
|
||||||
Web.WebBroker,
|
Web.WebBroker,
|
||||||
@ -27,6 +28,8 @@ begin
|
|||||||
try
|
try
|
||||||
LServer.DefaultPort := APort;
|
LServer.DefaultPort := APort;
|
||||||
LServer.Active := True;
|
LServer.Active := True;
|
||||||
|
ShellExecute(0, PChar('open'), PChar('http://localhost:8080/index.html'),
|
||||||
|
nil, nil, SW_SHOWMAXIMIZED);
|
||||||
Writeln('Press ESC to stop the server');
|
Writeln('Press ESC to stop the server');
|
||||||
LHandle := GetStdHandle(STD_INPUT_HANDLE);
|
LHandle := GetStdHandle(STD_INPUT_HANDLE);
|
||||||
while True do
|
while True do
|
||||||
|
@ -195,7 +195,6 @@
|
|||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="WebModuleU.pas">
|
<DCCReference Include="WebModuleU.pas">
|
||||||
<Form>WebModule1</Form>
|
<Form>WebModule1</Form>
|
||||||
<FormType>dfm</FormType>
|
|
||||||
<DesignClass>TWebModule</DesignClass>
|
<DesignClass>TWebModule</DesignClass>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
<DCCReference Include="SampleControllerU.pas"/>
|
<DCCReference Include="SampleControllerU.pas"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user