use connection strings for redis
This commit is contained in:
parent
f2ff558d2c
commit
100e782d9c
@ -8,16 +8,10 @@
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"BinaryDad.Coding": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"hotReloadEnabled": false,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
|
@ -32,8 +32,10 @@ namespace BinaryDad.Coding
|
||||
{
|
||||
AbortOnConnectFail = false
|
||||
};
|
||||
config.EndPoints.Add("redis:6379");
|
||||
|
||||
config.EndPoints.Add(Configuration.GetConnectionString("Redis"));
|
||||
config.SetDefaultPorts();
|
||||
|
||||
var connection = await ConnectionMultiplexer.ConnectAsync(config, writer);
|
||||
connection.ConnectionFailed += (_, e) =>
|
||||
{
|
||||
|
@ -6,5 +6,8 @@
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "cluster.home.lan:6379"
|
||||
}
|
||||
}
|
||||
|
@ -6,5 +6,8 @@
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "redis:6379"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user