Skip to content
Permalink
Browse files

Enviornment VAriables start

  • Loading branch information...
garywoodfine committed Apr 25, 2019
1 parent 3b07163 commit 0e97339546e4543eed16f45c2f6fee17813c677a
Showing with 12 additions and 0 deletions.
  1. +7 −0 src/Config/SpeakEnvironment.cs
  2. +1 −0 src/HelloConfiguration.csproj
  3. +2 −0 src/LambdaConfiguration.cs
  4. +2 −0 src/serverless.yml
@@ -0,0 +1,7 @@
namespace Threenine.ConfigTest.Config
{
public class SpeakEnvironment
{
public string SaySomething { get; set; }
}
}
@@ -13,6 +13,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
@@ -1,13 +1,15 @@
using System.IO;
using Microsoft.Extensions.Configuration;


namespace Threenine.ConfigTest
{
public class LambdaConfiguration : ILambdaConfiguration
{
public static IConfigurationRoot Configuration => new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();


@@ -3,6 +3,8 @@ service: Hello-Configuration
provider:
name: aws
runtime: dotnetcore2.1
environment:
SpeakEnvironment__SaySomething: "Eating Coconuts is cool"

package:
individually: true

0 comments on commit 0e97339

Please sign in to comment.
You can’t perform that action at this time.