forked from adam/discord-bot-shtik
contain web interface stuff
This commit is contained in:
parent
88ca468708
commit
f4bed1e6cb
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc.Razor;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using vassago.Models;
|
using vassago.Models;
|
||||||
|
|
||||||
@ -7,6 +8,11 @@ var builder = WebApplication.CreateBuilder(args);
|
|||||||
builder.Services.AddControllersWithViews();
|
builder.Services.AddControllersWithViews();
|
||||||
builder.Services.AddSingleton<IHostedService, vassago.ConsoleService>();
|
builder.Services.AddSingleton<IHostedService, vassago.ConsoleService>();
|
||||||
builder.Services.AddDbContext<ChattingContext>();
|
builder.Services.AddDbContext<ChattingContext>();
|
||||||
|
builder.Services.Configure<RazorViewEngineOptions>(o => {
|
||||||
|
o.ViewLocationFormats.Clear();
|
||||||
|
o.ViewLocationFormats.Add("/WebInterface/Views/{1}/{0}" + RazorViewEngine.ViewExtension);
|
||||||
|
o.ViewLocationFormats.Add("/WebInterface/Views/Shared/{0}" + RazorViewEngine.ViewExtension);
|
||||||
|
});
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
@ -23,4 +29,5 @@ app.MapControllerRoute(
|
|||||||
name: "default",
|
name: "default",
|
||||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
Loading…
Reference in New Issue
Block a user