Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

Migration4D

Generate Migrations for Delphi and Framework Horse

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Migration4D

Generate Migrations for Delphi and Framework Horse

For install CLI Migration4D using boss:

bash
$ boss install github.com/CachopaWeb/Migration4D

Sample Horse Server

delphi

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.