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

Step 15 Use environmental variables for the Unsplash API key #70

Open
reymon359 opened this issue May 20, 2020 · 4 comments
Open

Step 15 Use environmental variables for the Unsplash API key #70

reymon359 opened this issue May 20, 2020 · 4 comments

Comments

@reymon359
Copy link
Contributor

reymon359 commented May 20, 2020

I think it should be a nice thing to explain to the user what are Environmental Variables and how to create and use a .env file in the application and change the current way the Unsplash API key it's used

headers: {
  Authorization:
    'Client-ID 4d048cfb4383b407eff92e4a2a5ec36c0a866be85e64caafa588c110efad350d',
},

EDIT
This course is so extensive and full of teachings that I forgot that the .env file is actually explained in Step 3 > Client 3.1
So maybe just create one for the server and add the Unsplash API key to it?

@Urigo
Copy link
Owner

Urigo commented May 28, 2020

@reymon359 are you up for a PR to change it how you see fit?

@reymon359
Copy link
Contributor Author

Sure, I could find some time and work on it!

I was thinking of changing it to:

headers: {
  Authorization:
    `Client-ID ${process.env.UNSPLASH_ACCESS_KEY}`,
},

Although it could also be added in the env.ts file and then import it here.

What do you think?

@Urigo
Copy link
Owner

Urigo commented Jun 2, 2020

mmmm not sure, I'll leave it to your call!

reymon359 added a commit to reymon359/WhatsApp-Clone-Tutorial that referenced this issue Jun 25, 2020
Fix the text to use environmental variables for the Unsplash API key Urigo#70
@reymon359
Copy link
Contributor Author

Hi there! Sorry for the late response but I have been quite busy the last weeks. I submitted a pull request #84 to implement it. I tried to change the code too but when I click the submit button I am being redirected to a not working link.

I opened an issue to take it into account #85

Screenshot 2020-06-25 at 20 34 16

Screenshot 2020-06-25 at 20 25 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants