This repository was archived by the owner on Aug 20, 2020. It is now read-only.
File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,7 @@ node_modules
37
37
.node_repl_history
38
38
39
39
# Editor
40
- .vscode *
40
+ .vscode *
41
+
42
+ # Environment files
43
+ .env /* . *
Original file line number Diff line number Diff line change @@ -95,6 +95,31 @@ client.API(request, function (response) {
95
95
96
96
<a name =" usage " ></a >
97
97
# Usage
98
+
99
+ Following is an example using SendGrid. You can get your free account [ here] ( https://sendgrid.com/free?source=nodejs-http-client ) .
100
+
101
+ First, update your environment with your [ SENDGRID_API_KEY] ( https://app.sendgrid.com/settings/api_keys ) .
102
+
103
+ ``` bash
104
+ echo " export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
105
+ echo " sendgrid.env" >> .gitignore
106
+ source ./sendgrid.env
107
+ ```
108
+
109
+ You can copy the .env_example file located in the "examples" folder to ``` .env ``` in your project's root.
110
+
111
+ ``` cp examples/.env_sample .env ```
112
+
113
+ Then add your API Key into the file
114
+
115
+ Here is the [ full working code] ( https://github.com/sendgrid/nodejs-http-client/blob/master/examples/example.js ) .
116
+
117
+ To run the example:
118
+
119
+ ``` bash
120
+ node examples/example
121
+ ```
122
+ =======
98
123
[ Library Usage Documentation] ( https://github.com/sendgrid/nodejs-http-client/blob/master/USAGE.md )
99
124
100
125
<a name =" roadmap " ></a >
Original file line number Diff line number Diff line change
1
+ export SENDGRID_API_KEY=''
You can’t perform that action at this time.
0 commit comments