sendgrid-php icon indicating copy to clipboard operation
sendgrid-php copied to clipboard

Setup Environment variable on windows

Open omer-sds opened this issue 9 years ago • 7 comments

can anyone explain how am i going to setup the environment variable on windows, i tried pasting the source in cmd as guided

echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env

but it says 'source' is not recognized as an internal or external command , and it create a .gitignore file in c:\users\myusername\.gitignore which has "sendgrid.env" witten inside. can someone guide what should i be doing

omer-sds avatar Dec 25 '16 08:12 omer-sds

Hello @omer-sds,

My apologies, those examples are for Unix based systems, for Windows, please see: https://github.com/sendgrid/sendgrid-csharp#setup-environment-variables

I will leave this issue open so we can update our documentation.

Thanks!

thinkingserious avatar Jan 26 '17 22:01 thinkingserious

Hello @thinkingserious

please help in Update the development Environment with your SENDGRID_API_KEY.

smkazim avatar Mar 09 '17 10:03 smkazim

Hi @smkazim,

Please check this out: https://github.com/sendgrid/sendgrid-csharp#setup-environment-variables

Thanks!

thinkingserious avatar Mar 09 '17 17:03 thinkingserious

Please can you explain how am i going to setup the environment variable for php.

What does these lines mean;

Update your development environment with your SENDGRID_API_KEY. Run the following in your shell:

echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env echo "sendgrid.env" >> .gitignore source ./sendgrid.env

akoladesam avatar Apr 16 '19 16:04 akoladesam

Hello , can you please provide a solution for node.js too ? the docs still refer only linux system

IshayMaya avatar Jul 07 '19 11:07 IshayMaya

i was able to run these commands from a BASH Command Window run as Administrator -- bash does not have issue with source command

echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env echo "sendgrid.env" >> .gitignore source ./sendgrid.env

CBL-deborah-morrison avatar Sep 18 '19 18:09 CBL-deborah-morrison

i have a same problem. Cannot use 'source' command in windows

romaricsylvain avatar May 20 '21 15:05 romaricsylvain