Skip to content

Commit

Permalink
adding the code app.UseStaticFiles(); to run static files in my start…
Browse files Browse the repository at this point in the history
…up.cs
  • Loading branch information
fMATSINHE committed Jan 4, 2020
1 parent 78e614d commit fe88b35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions Helloword_core/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseDeveloperExceptionPage();
}

app.UseStaticFiles();
app.Map("/test", testPipeline);
// app.Use(next => async context =>
//{
// await context.Response.WriteAsync("Before Hello: ");
// await next.Invoke(context);
//});
app.Use(next => async context =>
{
await context.Response.WriteAsync("Before Hello: ");
await next.Invoke(context);
});

app.Run(async (context) =>
{
throw new Exception("Hello exception");
await context.Response.WriteAsync("hello word");
});
}
Expand Down
2 changes: 1 addition & 1 deletion Helloword_core/wwwroot/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<title></title>
</head>
<body>
<p> ola mundo </p>
<p><h3>Hello world to index.html in wwwroot folder </h3> </p>
</body>
</html>

0 comments on commit fe88b35

Please sign in to comment.