Creating a Project with Visual Studio:

* Further simplify code for running simple "Hello World!"
vs2019/2_Getting_Started
jason.zhu 2021-04-21 20:25:29 +10:00
parent 00abd93e13
commit 40767b05c7
1 changed files with 2 additions and 8 deletions

View File

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