blob: ba011a6546f4054616491e52cbcdeac88b856b8b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
global using I2R.LightNews.Services;
global using I2R.LightNews.Models;
global using IOL.Helpers;
using I2R.LightNews;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHttpClient<NrkRadioService>();
builder.Services.AddHttpClient<NrkNewsService>();
builder.Services.AddMemoryCache();
builder.Services.AddScoped<NrkNewsService>();
builder.Services.AddScoped<NrkRadioService>();
builder.Services.AddControllers();
builder.Services.AddRazorPages().AddRazorRuntimeCompilation();
var app = builder.Build();
app.UseStaticFiles();
app.UseStatusCodePages();
app.UseRouting();
app.MapRazorPages();
app.MapControllers();
RadioIndexDb.CreateIfNotExists();
app.Run();
|