FIX in Sample

This commit is contained in:
danieleteti 2015-10-18 16:38:48 +02:00
parent 7ca59a3b88
commit d9b1531aa7
3 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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

View File

@ -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"/>