-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
44 lines (36 loc) · 1.03 KB
/
Copy pathProgram.cs
File metadata and controls
44 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using tero.session.src.Core;
using tero.session.src.Features.Auth;
using tero.session.src.Features.Imposter;
using tero.session.src.Features.Platform;
using tero.session.src.Features.Quiz;
using tero.session.src.Features.Spin;
var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;
var config = builder.Configuration;
// Configure logging format
builder.Logging.ClearProviders();
builder.Logging.AddConsole(options =>
{
options.FormatterName = "simple";
});
builder.Logging.AddSimpleConsole(options =>
{
options.SingleLine = true;
options.TimestampFormat = "yyyy-MM-dd HH:mm:ss ";
options.IncludeScopes = false;
});
services.AddControllers();
services.AddSignalR();
// Add custom services
services.AddAuthServices(config);
services.AddPlatformServices(config);
services.AddCoreServices(config);
var app = builder.Build();
app.MapControllers();
// Add custom hubs
app.AddQuizHub();
app.AddSpinHub();
app.AddImposterHub();
// Health check for tero-platform
app.MapGet("/health", () => "OK");
app.Run();