Created
May 31, 2020 08:05
-
-
Save corespider/e37d6152a5e608e8ad03c6e4ac0c8fae to your computer and use it in GitHub Desktop.
CoreSpider- Middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.Use(async (context, next) => | |
{ | |
await context.Response.WriteAsync("Hello World check from Use method!"); | |
await next(); | |
}); | |
app.Run(async (context) => | |
{ | |
await context.Response.WriteAsync("Hello World check from Run method!"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment