Skip to content

Commit a86a7d8

Browse files
Update README.md
1 parent fc2b294 commit a86a7d8

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,17 @@ Sample Horse Server
55
```delphi
66
uses Horse, Horse.Jhonson, Horse.HandleException, System.SysUtils;
77
8-
var
9-
App: THorse;
10-
118
begin
12-
App := THorse.Create(9000);
13-
14-
App.Use(Jhonson);
15-
App.Use(HandleException);
9+
THorse
10+
.Use(Jhonson)
11+
.Use(HandleException);
1612
17-
App.Get('ping',
13+
THorse.Get('/ping',
1814
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
1915
begin
20-
raise Exception.Create('My Error!');
16+
raise EHorseException.Create('My Error!');
2117
end);
2218
23-
App.Start;
19+
THorse.Listen(9000);
2420
end.
2521
```

0 commit comments

Comments
 (0)