Creating a Project with Visual Studio:

* Remove unnecessary code snippet, to make code more simplified
vscode/2_Getting_Started
jason.zhu 2021-04-21 10:32:39 +10:00
parent 967dd600fe
commit cb8cb6662e
1 changed files with 2 additions and 12 deletions

View File

@ -21,19 +21,9 @@ namespace DutchTreat
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ {
if (env.IsDevelopment()) app.Run(async context =>
{ {
app.UseDeveloperExceptionPage(); await context.Response.WriteAsync("Hello World!");
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Hello World!");
});
}); });
} }
} }