Open a page on mobile when on localhost (Mac)

Get the IP address to check a localhost webpage on the phone when the server is running on the Mac. Don't forget to add the port. (e.g. 192.168.1.34:3000). Note that this works only when both the Mac and your phone are on the same network.

ifconfig | grep inet | grep 192 | awk '{print $2}'

Side note: navigator.clipboard.writeText() won't work on iOS Safari for security reasons (TODO: ref)

<a href="https://example.org" target="_blank" rel="noopener noreferrer">link name</a>
  • TODO: explain in short the security issues when using only the target="_blank" attribute-value pair