Skip to content

Commit b73b816

Browse files
committed
feat: ✨ Add .env support
1 parent a779553 commit b73b816

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

PlotSystem-API/PlotSystem-API.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11+
<PackageReference Include="dotenv.net" Version="4.0.0" />
1112
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.3">
1213
<PrivateAssets>all</PrivateAssets>
1314
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

PlotSystem-API/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
using dotenv.net;
12
using Microsoft.EntityFrameworkCore;
23
using PlotSystem_API;
34
using PlotSystem_API.Models;
45
using PlotSystem_API.Services;
56

7+
DotEnv.Load(); // Load environment variables from .env file
8+
69
var builder = WebApplication.CreateBuilder(args);
710

811
builder.Services.AddCors(options =>

0 commit comments

Comments
 (0)