title: IdentityServer 4 as a Console Application
body: <p>I'm trying to run IdentityServer4 as console application. But I'm unsure if I'm doing right. I created <em>Console Application (.NET Core)</em> instead of <em>ASP.NET Core Web Application (.NET Core)</em>.</p>
  
  <p>My setup of <code>WebHostBuilder</code> is pretty straightforward:</p>
  
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          var host = new WebHostBuilder()
              .UseKestrel()
              .UseStartup&lt;Startup&gt;()
              .Build();
  
          host.Run();
      }
  }
  </code></pre>
  
  <p>Also the <em>Startup</em> class is very tiny:</p>
  
  <pre><code>public class Startup
  {
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddIdentityServer()
                  .AddTemporarySigningCredential()
                  .AddInMemoryIdentityResources(Config.GetIdentityResources())
                  .AddInMemoryApiResources(Config.GetApiResources())
                  .AddInMemoryClients(Config.GetClients())
                  .AddTestUsers(Config.GetUsers());
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
      {
          loggerFactory.AddConsole();
          app.UseIdentityServer();
      }
  }
  </code></pre>
  
  <p>I'm just concerned if I'm missing some pieces which could lead to problems later. Am I on the right way?</p>