Skip to content

Commit 3976d3d

Browse files
Horse 2.0 #3
1 parent 0f7891c commit 3976d3d

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,17 @@ $ boss install github.com/HashLoad/horse-cors
88

99
### Sample Horse Server with CORS middleware
1010
```delphi
11-
uses
12-
Horse, Horse.CORS;
11+
uses Horse, Horse.CORS;
1312
14-
var
15-
App: THorse;
16-
17-
begin
18-
App := THorse.Create(9000);
19-
20-
App.Use(CORS);
13+
begin
14+
THorse.Use(CORS);
2115
22-
App.Post('marco',
16+
THorse.Post('/ping',
2317
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
2418
begin
25-
Res.Send('polo');
19+
Res.Send('pong');
2620
end);
2721
28-
App.Start;
22+
THorse.Listen(9000);
23+
end;
2924
```

0 commit comments

Comments
 (0)