diff --git a/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/Program.cs b/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/Program.cs index 0d6a853..d22d1b4 100644 --- a/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/Program.cs +++ b/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/Program.cs @@ -2,11 +2,36 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Convey; +using Convey.WebApi; +using SwiftParcel.Services.Pricing.Api.Infrastructure; +using Convey.WebApi.CQRS; +using SwiftParcel.Services.Pricing.Api.Queries; +using SwiftParcel.Services.Pricing.Api.dto; +using Convey.Types; +using Convey.Logging; +using Convey.Secrets.Vault; namespace SwiftParcel.Services.Pricing.Api { public class Program { - + public static async Task Main(string[] args) + => await WebHost.CreateDefaultBuilder(args) + .ConfigureServices(services => services + .AddConvey() + .AddWebApi() + .AddInfrastructure() + .Build()) + .Configure(app => app + .UseInfrastructure() + .UseDispatcherEndpoints(endpoints => endpoints + .Get("", ctx => ctx.Response.WriteAsync(ctx.RequestServices.GetService().Name)) + .Get("pricing"))) + .UseLogging() + .UseVault() + .Build() + .RunAsync(); } } \ No newline at end of file diff --git a/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/SwiftParcel.Services.Pricing.Api.csproj b/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/SwiftParcel.Services.Pricing.Api.csproj index 735c489..ff51b6a 100644 --- a/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/SwiftParcel.Services.Pricing.Api.csproj +++ b/SwiftParcel.Services.Pricing/src/SwiftParcel.Services.Pricing.Api/SwiftParcel.Services.Pricing.Api.csproj @@ -2,7 +2,7 @@ net6.0 - enable + disable enable