Skip to content

Commit

Permalink
Merge pull request #599 from thepriefy/priefy-issue-597
Browse files Browse the repository at this point in the history
Add a .env_sample file, update gitignore, update README.md
  • Loading branch information
Matt Bernier authored Oct 30, 2017
2 parents 8eafcdd + edbf88f commit abd664e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env_sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SENDGRID_API_KEY=''
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,6 @@ $RECYCLE.BIN/
*.lnk

# Code
/.vscode
/.vscode

.env
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ Click the "New" button beneath the User Variables list. Give it the name `NAME_O

For value, insert your SendGrid API key. Click "Ok", and once again in the Variable Overview and lastly, close the system properties window.

For other Windows version, you can set an environment variable like this:

```csharp
var setKey = Environment.SetEnvironmentVariable("NAME_OF_THE_ENVIRONMENT_VARIABLE_FOR_YOUR_SENDGRID_KEY", value);
```

For example,

```csharp
var setKey = Environment.SetEnvironmentVariable("SENDGRID_API_KEY", YOUR_API_KEY);
```

You may need to restart your IDE to make use of the new variable.

Now, if all went well, you can access the just added variable in your C# SendGrid projects! Ready for some examples?
Expand Down Expand Up @@ -263,4 +275,4 @@ sendgrid-csharp is guided and supported by the SendGrid [Developer Experience Te
sendgrid-csharp is maintained and funded by SendGrid, Inc. The names and logos for sendgrid-csharp are trademarks of SendGrid, Inc.

# License
[The MIT License (MIT)](LICENSE.txt)
[The MIT License (MIT)](LICENSE.txt)

0 comments on commit abd664e

Please sign in to comment.