media upload
This commit is contained in:
parent
befaa207d7
commit
0d7da2ea85
33 changed files with 257 additions and 353 deletions
|
@ -1,6 +1,8 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Femto.Modules.Blog;
|
||||
using Femto.Modules.Media;
|
||||
using Quartz;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
@ -10,7 +12,17 @@ var databaseConnectionString = builder.Configuration.GetConnectionString("Databa
|
|||
if (databaseConnectionString is null)
|
||||
throw new Exception("no database connection string found");
|
||||
|
||||
var blobStorageRoot = builder.Configuration.GetValue<string>("BlobStorageRoot");
|
||||
if (blobStorageRoot is null)
|
||||
throw new Exception("no blob storage root found");
|
||||
|
||||
builder.Services.AddQuartzHostedService(options =>
|
||||
{
|
||||
options.WaitForJobsToComplete = true;
|
||||
});
|
||||
|
||||
builder.Services.UseBlogModule(databaseConnectionString);
|
||||
builder.Services.UseMediaModule(databaseConnectionString, blobStorageRoot);
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue