IP Address Tracker

Solution retrospective
I am proud of myself to have tried a project that I never imagined I could complete. This helped me try my hand at creating backend for my project and keeping the api key as an environment variable in the .env file and gitignore. I used multiple resources online to understand how to use Leaflet and ipify.
What challenges did you encounter, and how did you overcome them?It was a new learning to display the user's ip location using app.get('/api/ip', async (req, res) => { const ip = req.query.ip || req.headers['x-forwarded-for']?.split(',')[0]; const apiKey = process.env.IPIFY_API_KEY;
because it would show the backend web services server location at first.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Akshata's solution.
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