Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a .env_sample file, update gitignore, update README.md #599

Merged
merged 4 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)