From f764776321730619cba3002e98d7e893aef579ae Mon Sep 17 00:00:00 2001 From: alibw Date: Wed, 31 Dec 2025 17:38:21 +0330 Subject: [PATCH] Added DotEnv package and example.env file --- PdfService/PdfService.csproj | 1 + PdfService/Program.cs | 8 ++++++++ PdfService/example.env | 1 + 3 files changed, 10 insertions(+) create mode 100644 PdfService/example.env diff --git a/PdfService/PdfService.csproj b/PdfService/PdfService.csproj index f5c23a7..019d382 100644 --- a/PdfService/PdfService.csproj +++ b/PdfService/PdfService.csproj @@ -7,6 +7,7 @@ + diff --git a/PdfService/Program.cs b/PdfService/Program.cs index 62a9446..cdbe14b 100644 --- a/PdfService/Program.cs +++ b/PdfService/Program.cs @@ -1,8 +1,16 @@ using System.Data; +using dotenv.net; using Microsoft.AspNetCore.WebUtilities; using Newtonsoft.Json; using PdfService; +DotEnv.Load(); + +SentrySdk.Init(options => +{ + options.Dsn = Environment.GetEnvironmentVariable("SENTRY_DSN"); +}); + var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); diff --git a/PdfService/example.env b/PdfService/example.env new file mode 100644 index 0000000..18b8085 --- /dev/null +++ b/PdfService/example.env @@ -0,0 +1 @@ +SENTRY_DSN=https://d3fd87d14e555556d3f76e42d94a63a0@sentry.rayvarz.center/10 \ No newline at end of file