mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 01:25:38 -05:00
Initial setup of environment service
This commit is contained in:
26
Environment/Service/Program.cs
Normal file
26
Environment/Service/Program.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using ChrisKaczor.HomeMonitor.Environment.Service.Data;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Environment.Service;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Configuration.AddEnvironmentVariables();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddTransient<Database>();
|
||||
builder.Services.AddHostedService<MessageHandler>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user