Created
January 19, 2017 13:47
-
-
Save jorgedison/da7b24bfa9154015a8120bf1ca7bc479 to your computer and use it in GitHub Desktop.
Program.cs
This file contains hidden or 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
using System; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var host = new WebHostBuilder() | |
.UseKestrel() | |
.UseStartup<Startup>() | |
.UseUrls(args) | |
.Build(); | |
host.Run() | |
} | |
} | |
public class Startup | |
{ | |
public void Configure(IApplicationBuilder app) | |
{ | |
app.Run(async (context)=> | |
{ | |
await context.Response.WriteAsync("Hora..." + DateTime.Now.ToString()); | |
}); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment