Commit 199ad621 authored by Marc Gravell's avatar Marc Gravell

get a little further with kestrel

parent 78a37102
......@@ -22,4 +22,5 @@ StackExchange.Redis.*.zip
test-results*.xml
packages/
StackExchange.Redis.Tests/*Config.json
t8.shakespeare.txt
\ No newline at end of file
t8.shakespeare.txt
launchSettings.json
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.2" />
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<ProjectReference Include="..\StackExchange.Redis.Server\StackExchange.Redis.Server.csproj" />
</ItemGroup>
</Project>
......@@ -15,11 +15,15 @@ public static void Main(string[] args)
WebHost.CreateDefaultBuilder(args)
.UseKestrel(options =>
{
// HTTP 5000
options.ListenLocalhost(5000);
// TCP 6379
options.ListenLocalhost(8007, builder =>
options.ListenLocalhost(6379, builder =>
{
builder.UseConnectionHandler<RedisConnectionHandler>();
});
});
}).UseStartup<Startup>();
}
}
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace KestrelRedisServer
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// 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) =>
{
await context.Response.WriteAsync("Redis-ish server should be running");
});
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment