-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New version 1.4.0 - Lazarus support - New methods to use the variable or a default value set on the method parameter
- Loading branch information
1 parent
6eb2988
commit 953165e
Showing
35 changed files
with
2,150 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
program Servidor; | ||
|
||
{$APPTYPE CONSOLE} | ||
|
||
{$R *.res} | ||
|
||
uses | ||
System.SysUtils, | ||
Horse, | ||
DotEnv4Delphi; | ||
|
||
begin | ||
THorse.Get('/ping', | ||
procedure(Req: THorseRequest; Res: THorseResponse) | ||
begin | ||
Res.Send('pong'); | ||
end); | ||
|
||
{ | ||
No JavaScript, usando o ExpressJS, teriamos uma linha como: | ||
app.listen(process.env.PORT || 3000); | ||
A Linha abaixo tem a mesma funcionalidade, sendo que | ||
DotEnv.PortorDefault(3000) é igual a process.env.PORT || 3000 | ||
} | ||
THorse.Listen(DotEnv.PortOrDefault(3000)); | ||
end. |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"hash": "d41d8cd98f00b204e9800998ecf8427e", | ||
"updated": "2023-06-30T22:00:57.8470623-03:00", | ||
"installedModules": { | ||
"github.com/hashload/horse": { | ||
"name": "horse", | ||
"version": "3.1.3", | ||
"hash": "752c3b943782e4910cd0a3ac3beeb4ee", | ||
"artifacts": {}, | ||
"failed": false, | ||
"changed": false | ||
}, | ||
"https://github.com/rafael-figueiredo-alves/dotenv4delphi": { | ||
"name": "dotenv4delphi", | ||
"version": "v1.4.0", | ||
"hash": "55f3cbe2cbe03e20b930cd2249afef8b", | ||
"artifacts": {}, | ||
"failed": false, | ||
"changed": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "Servidor", | ||
"description": "", | ||
"version": "1.0.0", | ||
"homepage": "", | ||
"mainsrc": "./src", | ||
"projects": [], | ||
"dependencies": { | ||
"github.com/hashload/horse": "^3.1.3", | ||
"https://github.com/rafael-figueiredo-alves/dotenv4delphi": "^v1.4.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"hash": "d41d8cd98f00b204e9800998ecf8427e", | ||
"updated": "2023-06-29T21:25:00.4514542-03:00", | ||
"installedModules": { | ||
"https://github.com/rafael-figueiredo-alves/dotenv4delphi": { | ||
"name": "dotenv4delphi", | ||
"version": "v1.4.0", | ||
"hash": "55f3cbe2cbe03e20b930cd2249afef8b", | ||
"artifacts": {}, | ||
"failed": false, | ||
"changed": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "Demo - DotEnv4Delphi - Delphi", | ||
"description": "Demo", | ||
"version": "1.0.0", | ||
"homepage": "", | ||
"mainsrc": "./src", | ||
"projects": [], | ||
"dependencies": { | ||
"https://github.com/rafael-figueiredo-alves/dotenv4delphi": "^v1.4.0" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Comentário | ||
|
||
MeuNome=Rafael Alves | ||
DB_USERNAME=${MeuNome}\Developer # teste | ||
Nome3=${MeuNome} - ${DB_USERNAME} - ${APPDATA} OK # teste poderoso | ||
Development=True | ||
Port=3001 | ||
BASE_URL=C:\Delphi | ||
API_TOKEN=12346-aaas-djkmdsnf-111234 | ||
ConnectionString=database:Delphi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CONFIG> | ||
<ProjectOptions> | ||
<Version Value="12"/> | ||
<PathDelim Value="\"/> | ||
<General> | ||
<SessionStorage Value="InProjectDir"/> | ||
<Title Value="demo"/> | ||
<Scaled Value="True"/> | ||
<ResourceType Value="res"/> | ||
<UseXPManifest Value="True"/> | ||
<XPManifest> | ||
<DpiAware Value="True"/> | ||
</XPManifest> | ||
<Icon Value="0"/> | ||
</General> | ||
<BuildModes> | ||
<Item Name="Default" Default="True"/> | ||
</BuildModes> | ||
<PublishOptions> | ||
<Version Value="2"/> | ||
<UseFileFilters Value="True"/> | ||
</PublishOptions> | ||
<RunParams> | ||
<FormatVersion Value="2"/> | ||
</RunParams> | ||
<RequiredPackages> | ||
<Item> | ||
<PackageName Value="LCL"/> | ||
</Item> | ||
</RequiredPackages> | ||
<Units> | ||
<Unit> | ||
<Filename Value="demo.lpr"/> | ||
<IsPartOfProject Value="True"/> | ||
</Unit> | ||
<Unit> | ||
<Filename Value="unitmain.pas"/> | ||
<IsPartOfProject Value="True"/> | ||
<ComponentName Value="FormMain"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="Form"/> | ||
<UnitName Value="unitMain"/> | ||
</Unit> | ||
</Units> | ||
</ProjectOptions> | ||
<CompilerOptions> | ||
<Version Value="11"/> | ||
<PathDelim Value="\"/> | ||
<Target> | ||
<Filename Value="demo"/> | ||
</Target> | ||
<SearchPaths> | ||
<IncludeFiles Value="$(ProjOutDir)"/> | ||
<OtherUnitFiles Value="modules\.dcp;modules\.dcu;modules;modules\dotenv4delphi\src"/> | ||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> | ||
</SearchPaths> | ||
<Linking> | ||
<Debugging> | ||
<DebugInfoType Value="dsDwarf2Set"/> | ||
</Debugging> | ||
<Options> | ||
<Win32> | ||
<GraphicApplication Value="True"/> | ||
</Win32> | ||
</Options> | ||
</Linking> | ||
</CompilerOptions> | ||
<Debugging> | ||
<Exceptions> | ||
<Item> | ||
<Name Value="EAbort"/> | ||
</Item> | ||
<Item> | ||
<Name Value="ECodetoolError"/> | ||
</Item> | ||
<Item> | ||
<Name Value="EFOpenError"/> | ||
</Item> | ||
</Exceptions> | ||
</Debugging> | ||
</CONFIG> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CONFIG> | ||
<ProjectSession> | ||
<PathDelim Value="\"/> | ||
<Version Value="12"/> | ||
<BuildModes Active="Default"/> | ||
<Units> | ||
<Unit> | ||
<Filename Value="demo.lpr"/> | ||
<IsPartOfProject Value="True"/> | ||
<EditorIndex Value="-1"/> | ||
<WindowIndex Value="-1"/> | ||
<TopLine Value="-1"/> | ||
<CursorPos X="-1" Y="-1"/> | ||
<UsageCount Value="22"/> | ||
</Unit> | ||
<Unit> | ||
<Filename Value="unitmain.pas"/> | ||
<IsPartOfProject Value="True"/> | ||
<ComponentName Value="FormMain"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="Form"/> | ||
<UnitName Value="unitMain"/> | ||
<IsVisibleTab Value="True"/> | ||
<TopLine Value="63"/> | ||
<CursorPos X="28" Y="75"/> | ||
<UsageCount Value="22"/> | ||
<Loaded Value="True"/> | ||
<LoadedDesigner Value="True"/> | ||
</Unit> | ||
<Unit> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<EditorIndex Value="1"/> | ||
<TopLine Value="465"/> | ||
<CursorPos X="14" Y="66"/> | ||
<UsageCount Value="11"/> | ||
<Loaded Value="True"/> | ||
</Unit> | ||
</Units> | ||
<JumpHistory HistoryIndex="28"> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="25" Column="20" TopLine="5"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<Caret Line="7" Column="26"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<Caret Line="71" Column="33" TopLine="59"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<Caret Line="5" Column="9"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="25" Column="20" TopLine="5"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="29" Column="20" TopLine="6"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="30" Column="20" TopLine="7"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="39" Column="5" TopLine="16"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="38" Column="43" TopLine="16"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="39" Column="43" TopLine="17"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="43" Column="73" TopLine="28"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="44" Column="73" TopLine="29"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="43" Column="73" TopLine="28"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="44" Column="73" TopLine="29"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="45" Column="73" TopLine="30"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="44" Column="73" TopLine="29"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="45" Column="73" TopLine="30"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="44" Column="73" TopLine="29"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="43" Column="73" TopLine="28"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="45" Column="73" TopLine="24"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="61" Column="54" TopLine="41"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="62" Column="54" TopLine="42"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="63" Column="54" TopLine="43"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="57" TopLine="47"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="72" Column="3" TopLine="58"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="88" Column="47"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="unitmain.pas"/> | ||
<Caret Line="87" Column="61" TopLine="66"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<Caret Line="66" Column="14" TopLine="102"/> | ||
</Position> | ||
<Position> | ||
<Filename Value="modules\dotenv4delphi\src\DotEnv4Delphi.pas"/> | ||
<Caret Line="61" Column="14" TopLine="106"/> | ||
</Position> | ||
</JumpHistory> | ||
<RunParams> | ||
<FormatVersion Value="2"/> | ||
<Modes ActiveMode=""/> | ||
</RunParams> | ||
</ProjectSession> | ||
</CONFIG> |
Oops, something went wrong.