Skip to content

Commit

Permalink
adding controllers service
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadzm committed Apr 29, 2021
1 parent 4461546 commit 96f2aef
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions RabbitMq/RabbitMq.Producer/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,18 @@ namespace RabbitMq.Producer
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940

public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}

app.UseRouting();

app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Hello World!");
});
endpoints.MapDefaultControllerRoute();
});
}
}
Expand Down

0 comments on commit 96f2aef

Please sign in to comment.