Generate Migrations for Delphi and Framework Horse
For install CLI Migration4D using boss:
$ boss install github.com/CachopaWeb/Migration4D
Sample Horse Server
uses System.SysUtils,
Horse,
Horse.Migration4D;
begin
THorse.Use(HorseMigration4D());
//run migrations based in file configuration
//Migration4D.json, generated with command CLI "Migration4D Init"
//Run generated migrations with command CLI "Migration4D migration:create -n name"
//Add migrations generated on directory Migrations in your project Exe: Add to Project Shift+F11
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
begin
Res.Send('pong');
end);
THorse.Listen(9000,
procedure (App: THorse)
begin
Writeln('Server is running on port '+App.Port.ToString);
end);
end.