.AddEnvironmentVariables()
parent
f04a9e130d
commit
0bcf605539
|
@ -27,6 +27,7 @@ namespace NetworkResurrector.Api
|
||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
.SetBasePath(Directory.GetCurrentDirectory())
|
.SetBasePath(Directory.GetCurrentDirectory())
|
||||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||||
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var connectionString = configuration.GetConnectionString("DatabaseConnection");
|
var connectionString = configuration.GetConnectionString("DatabaseConnection");
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace NetworkResurrector.Server
|
||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
.SetBasePath(Directory.GetCurrentDirectory())
|
.SetBasePath(Directory.GetCurrentDirectory())
|
||||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||||
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var connectionString = configuration.GetConnectionString("DatabaseConnection");
|
var connectionString = configuration.GetConnectionString("DatabaseConnection");
|
||||||
|
|
Loading…
Reference in New Issue