Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

SASS and Vanilla JS

P
Dan Mariusβ€’ 625

@danmlarsen

Desktop design screenshot for the IP Address Tracker coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any suggestions, feedback, or possible improvements are always welcome.

Community feedback

Faris Pβ€’ 2,810

@FarisPalayi

Posted

Excellent workπŸ‘

Try to hide the api key if you can. (For example, by using environment variables or Netlify's serverless functions). Happy coding ✨

Marked as helpful

2

P
Dan Mariusβ€’ 625

@danmlarsen

Posted

@FarisPalayi Thanks 😊 I've hidden it from GitHub by using a .env file now. But I'm pretty sure it is still exposed in the .js?

0
Faris Pβ€’ 2,810

@FarisPalayi

Posted

@danmlarsen yes, it is still exposed in the JavaScript file. You can check that by going to the source tab of dev tools.

Since you don't have server side code, I suggest you to use Netlify's serverless functions. Take a look at these sources to understand how environment variables works video, article

And how to use the Netlify functions - How To Hide API Keys Using Netlify

1
P
Dan Mariusβ€’ 625

@danmlarsen

Posted

@FarisPalayi I will take a look at those, thanks πŸ‘

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord