Tip of the day: simulate geolocation in chrome
Plus day 1 of Rails project week

Weāre building a stubhub clone in Rails and weāll be testing the local events feature. Hereās how weāre going to do it.
Howdy wonderful people! This week at the dojo (my last week btw š), is project week and weāre building a StubHub clone in Rails. One of Stubhubās features is the ability to see local events based on the userās location. The app will grab the users geolocation from their browser and send it to the backend to then serve the right events. But how will we test that the location feature is actually working? Using a vpn to change our IP address wonāt help because weāre getting the location using HTML5 geolocation, not from the IP address.

Luckily, the chrome developer tools include a great little feature to do this.
Here are the 4 simple steps:
- Open Chrome Developer tools
- Click the 3 dots and open console drawer
- Click the 3 dots in the console drawer and open sensors.
- Change the geolocation. Thats it!
Here is a quick demonstration.
I hope you enjoyed todayās tip. Until next time, happy coding š !
I am looking for an opportunity to join and contribute on a tech team, and Iād love to chat. Iām on Twitter, LinkedIn, Medium, Github or plain old email @ leibelhecht@gmail.com. My Portfolio is at leibelhecht.com

