Create a python interop service and wire it up
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using WebServer.Components;
|
||||
using PythonInterop;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -9,15 +10,20 @@ builder.Services.AddRazorComponents()
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
if (!app.Environment.IsDevelopment()) {
|
||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
// Load the module in globally
|
||||
AIModule interopModule = new AIModule();
|
||||
|
||||
// Run this for testing purposes
|
||||
interopModule.PullData();
|
||||
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAntiforgery();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user