Skip to content

Instantly share code, notes, and snippets.

@jorgedison
Created January 19, 2017 13:47
Show Gist options
  • Save jorgedison/da7b24bfa9154015a8120bf1ca7bc479 to your computer and use it in GitHub Desktop.
Save jorgedison/da7b24bfa9154015a8120bf1ca7bc479 to your computer and use it in GitHub Desktop.
Program.cs
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