title: Using appsettings.json in .Net 6 Worker service
body: <p>Is I wanted to add a singleton service that is dependent on appsettings.</p>
  <p>How would I do this in the .Net 6 worker service startup?</p>
  <pre><code>using AutoMapper;
  
  var mapperConfig = new MapperConfiguration(mc =&gt;
  {
      mc.AddProfile(new MappingProfile());
  });
  
  IMapper mapper = mapperConfig.CreateMapper();
  
  IHost host = Host.CreateDefaultBuilder(args)
      .ConfigureServices(services =&gt;
      {
          services.AddHostedService&lt;Worker&gt;();
          services.AddSingleton(mapper);
          services.AddSingleton&lt;IOrderNumberGenerator, OrderNumberGenerator&gt;();
  
          services.AddSingleton(new ServiceIwantToCall(&lt;--I need too use apsettings here--&gt;));
      })
      .Build();
  
  await host.RunAsync();
  
  </code></pre>