예제 #1
0
파일: Startup.cs 프로젝트: anurse/aspval
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.Run(async(context) =>
            {
                context.Response.ContentType = "text/plain";
                await context.Response.WriteAsync(FxInfo.Get());
            });
        }
예제 #2
0
파일: Startup.cs 프로젝트: anurse/aspval
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapGet("/", async(context) =>
                {
                    context.Response.ContentType = "text/plain";
                    await context.Response.WriteAsync(FxInfo.Get());
                });
            });
        }