Added DotEnv package and example.env file

This commit is contained in:
2025-12-31 17:38:21 +03:30
parent df405dc69c
commit f764776321
3 changed files with 10 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="dotenv.net" Version="4.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Stimulsoft.Reports.Engine.NetCore" Version="2025.2.3" /> <PackageReference Include="Stimulsoft.Reports.Engine.NetCore" Version="2025.2.3" />
</ItemGroup> </ItemGroup>

View File

@@ -1,8 +1,16 @@
using System.Data; using System.Data;
using dotenv.net;
using Microsoft.AspNetCore.WebUtilities; using Microsoft.AspNetCore.WebUtilities;
using Newtonsoft.Json; using Newtonsoft.Json;
using PdfService; using PdfService;
DotEnv.Load();
SentrySdk.Init(options =>
{
options.Dsn = Environment.GetEnvironmentVariable("SENTRY_DSN");
});
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var app = builder.Build(); var app = builder.Build();

1
PdfService/example.env Normal file
View File

@@ -0,0 +1 @@
SENTRY_DSN=https://d3fd87d14e555556d3f76e42d94a63a0@sentry.rayvarz.center/10