2016-03-16 21:33:52 -04:00
2016-03-16 21:33:52 -04:00
2016-03-13 21:39:47 -04:00
2016-03-13 21:39:47 -04:00
2016-03-13 21:39:47 -04:00
2016-03-16 21:33:52 -04:00
2016-03-16 21:33:52 -04:00

This is a simple asp.net core 1.0 middlewear to add a livecheck to your app without having to make controllers, and what not. This is useful to keep your livecheck requests out of your MVC action filter lifecycle

Usage

Install-Package Alive.Net

Ultra-Simple:

//this will default to /livecheck with 200
app.UseAlive(a =>
            {

            });

Simple


app.UseAlive(a =>
            {
                a.BodyText = "Im awesome";
                a.StatusCode = System.Net.HttpStatusCode.OK;
                a.LivecheckPath = new Microsoft.AspNet.Http.PathString("/CustomLivecheck");
            });

Complex


app.UseAlive(a =>
           a.OnLivecheckResponse = (response) =>
           {
               if(ThingsThatCouldMakeOurAppDown)
               {
                   response.BodyText = "awesome";
                   response.StatusCode = System.Net.HttpStatusCode.BadGateway;
               }
               else
               {
                   response.BodyText = "awesome";
                   response.StatusCode = System.Net.HttpStatusCode.OK;
               }
           });

Description
Livecheck middlewear for aspnet core 1.0
Readme MIT 118 KiB
Languages
C# 45.1%
HTML 44.8%
JavaScript 7.4%
CSS 2.7%