- An unhandled error has occurred.
-
Reload
-
🗙
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/apps/Elsa.ServerAndStudio.Web/Program.cs b/src/apps/Elsa.ServerAndStudio.Web/Program.cs
deleted file mode 100644
index 9fc5e8ae3..000000000
--- a/src/apps/Elsa.ServerAndStudio.Web/Program.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using Elsa.Extensions;
-using Elsa.Persistence.EFCore.Extensions;
-using Elsa.Persistence.EFCore.Modules.Management;
-using Elsa.Persistence.EFCore.Modules.Runtime;
-using Elsa.ServerAndStudio.Web.Enums;
-using Elsa.ServerAndStudio.Web.Extensions;
-using Medallion.Threading.FileSystem;
-using Microsoft.AspNetCore.Mvc;
-
-var builder = WebApplication.CreateBuilder(args);
-builder.WebHost.UseStaticWebAssets();
-var services = builder.Services;
-var configuration = builder.Configuration;
-var identitySection = configuration.GetSection("Identity");
-var identityTokenSection = identitySection.GetSection("Tokens");
-
-// Add Elsa services.
-services
- .AddElsa(elsa =>
- {
- elsa
- .UseSasTokens()
- .UseIdentity(identity =>
- {
- identity.TokenOptions = options => identityTokenSection.Bind(options);
- identity.UseConfigurationBasedUserProvider(options => identitySection.Bind(options));
- identity.UseConfigurationBasedApplicationProvider(options => identitySection.Bind(options));
- identity.UseConfigurationBasedRoleProvider(options => identitySection.Bind(options));
- })
- .UseDefaultAuthentication()
- .UseWorkflowManagement(management =>
- {
- management.UseEntityFrameworkCore(ef => ef.UseSqlite());
- management.UseCache();
- })
- .UseWorkflowRuntime(runtime =>
- {
- runtime.UseEntityFrameworkCore(ef => ef.UseSqlite());
- runtime.UseCache();
- runtime.DistributedLockProvider = _ => new FileDistributedSynchronizationProvider(new(Path.Combine(Directory.GetCurrentDirectory(), "App_Data", "locks")));
- runtime.WorkflowDispatcherOptions = options => configuration.GetSection("Runtime:WorkflowDispatcher").Bind(options);
- })
- .UseJavaScript(javaScriptFeature => javaScriptFeature.ConfigureJintOptions(jintOptions => jintOptions.AllowClrAccess = true))
- .UseLiquid()
- .UseCSharp()
- .UsePython(python =>
- {
- python.PythonOptions += options =>
- {
- // Make sure to configure the path to the python DLL. E.g. /opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11
- // alternatively, you can set the PYTHONNET_PYDLL environment variable.
- configuration.GetSection("Scripting:Python").Bind(options);
- };
- })
- .UseHttp(http =>
- {
- http.UseCache();
- http.ConfigureHttpOptions = options =>
- {
- options.BaseUrl = new(configuration["Hosting:BaseUrl"] ?? configuration["Http:BaseUrl"]!); // HttpBaseUrl is for backward compatibility.
- options.BasePath = configuration["Http:BasePath"];
- };
- })
- .UseWorkflowsApi()
- .AddActivitiesFrom