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