<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tiffany Bouchard</title>
    <description>The latest articles on DEV Community by Tiffany Bouchard (@tiffbouchard).</description>
    <link>https://dev.to/tiffbouchard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F585680%2F53598687-269c-45d7-801f-f2123cb0ff25.jpeg</url>
      <title>DEV Community: Tiffany Bouchard</title>
      <link>https://dev.to/tiffbouchard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tiffbouchard"/>
    <language>en</language>
    <item>
      <title>Testing localhost on mobile</title>
      <dc:creator>Tiffany Bouchard</dc:creator>
      <pubDate>Mon, 01 Mar 2021 17:51:11 +0000</pubDate>
      <link>https://dev.to/tiffbouchard/testing-localhost-on-mobile-33c5</link>
      <guid>https://dev.to/tiffbouchard/testing-localhost-on-mobile-33c5</guid>
      <description>&lt;p&gt;Sometimes I find that Google Dev Tools aren't always accurate when testing for mobile and responsivity and I end up realizing certain UI bugs only after deploying. To save time, I wanted a way to test my localhost directly on mobile devices.&lt;/p&gt;

&lt;p&gt;Note: I've only used this with Django and Apple devices - so just bear this in mind, but I want to try with React etc. and will update the post when I do&lt;/p&gt;

&lt;p&gt;Before you start, ensure your computer and your device you want to test on (mobile, iPad etc.) are connected to the same network&lt;/p&gt;

&lt;p&gt;1) Navigate to &lt;strong&gt;System Preferences -&amp;gt; Sharing&lt;/strong&gt;&lt;br&gt;
2) Check the &lt;strong&gt;Internet Sharing&lt;/strong&gt; checkbox (Confirm by clicking Start in the pop-up)&lt;br&gt;
3) At the top under Computer Name, you should see &lt;strong&gt;"Computers on your local network can access your computer at: Your-Computer-Name-Here"&lt;/strong&gt; (In my case it is Tiffanys-Macbook-Air.local)&lt;br&gt;
4) Now if I want to access localhost:8001 for example, I would type &lt;em&gt;Tiffanys-Macbook-Air.local:8001&lt;/em&gt; into my mobile browser&lt;/p&gt;

&lt;p&gt;5) Sometimes you need an extra step, and in the case of Django, you need to do some binding before 4). You need to explicitly run your server on that port. &lt;/p&gt;

&lt;p&gt;So in my case instead of starting my Django server like this: &lt;code&gt;python manage.py runserver localhost:8001&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I would do this: &lt;br&gt;
&lt;code&gt;python manage.py runserver Tiffanys-Macbook-Air.local:8001&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If anyone has any tips, feedback, or experience with this approach I'm really interested so feel free to drop a comment!&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>testing</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
