IP address tracker app | JS

Solution retrospective
It was a very fun and challenging project. I loved interacting with different APIs to track and display the location.
Some questions from the community : -
- Feedback on the method and regex to decide whether the user has entered an IP address or domain name. (In the
checkIP
function) - Although I have tested the app many times, but there may be some points at which the app might break or the logic might fail. If you notice any such points, please let me know.
- I am not very experienced in working with
async - await
. Feedback on error handling in asynchronous operations and use ofasync - await
is welcome.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @tediko
Hello, Praneet Dixit! 👋
Good job on this challenge! I just finished this project too. Kudos for button animation and this init rocket loader. There is a problem on Firefox. Console throws an
CORS
errorCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https (Reason: CORS request did not succeed)
. I encountered this problem too. Read about this error. The fix is to send your request to a proxy. A proxy acts as an intermediary between a client and server. The proxy server operates in between the frontend web app making the request, and the server that responds with data. Addhttps://cors.bridged.cc/
to any URL you’re fetching from. In your example it will be:https://cors.bridged.cc/https://geo.ipify.org/api/v1?apiKey=yourapikey
.Good luck with that, have fun coding! 💪
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