Skip to content

Commit

Permalink
Use hosted MQTT client service
Browse files Browse the repository at this point in the history
  • Loading branch information
willsawyerrrr committed Oct 4, 2024
1 parent 3ade550 commit f517e0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Mortein/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.OpenApi.Models;
using Mortein.Mqtt.Extensions;
using Mortein.Types;
using NodaTime.Serialization.SystemTextJson;
using System.Reflection;
Expand Down Expand Up @@ -37,7 +38,7 @@ public class Startup(IConfiguration configuration)
/// Add services to the container.
/// </summary>
///
/// <param name="services"></param>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers().AddJsonOptions(options =>
Expand All @@ -53,6 +54,7 @@ public void ConfigureServices(IServiceCollection services)
});
services.AddDbContext<DatabaseContext>();
services.AddEndpointsApiExplorer();
services.AddMqttClientHostedService();
services.AddSwaggerGen(options =>
{
options.SwaggerDoc("openapi", new OpenApiInfo()
Expand Down

0 comments on commit f517e0f

Please sign in to comment.