TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to test a localhost (desktop) from mobile?

3 pointsby bazookaBenalmost 13 years ago
Any easy way to do this? I don't want to mess with router port forwarding

5 comments

MattBearmanalmost 13 years ago
If you're on the same lan it's as simple as going to the IP address of the local server on your phone.<p>I recently tried exactly this. Running MAMP on my MacBook pro, went to 192.168.0.5 (my MacBook's IP address) on my iPhone while connected to the same wifi as the MacBook and there was the MAMP localhost page.<p>The only problem is (as far as I know) there's no way to edit /etc/hosts on an iPhone (although I imagine you can do it on Android), so it has to be IP based.
评论 #4401728 未加载
pixelcortover 12 years ago
If you are using an iOS device and your server is on the same network, you can use Bonjour/ZeroConf to quickly access it. For OS X, you can set the hostname in System Preferences &#62; Sharing. Then just access hostname.local from the iOS device.
bazookaBenalmost 13 years ago
SHIM looks pretty promising, and runs on nodeJS <a href="https://github.com/marstall/shim" rel="nofollow">https://github.com/marstall/shim</a><p>Any non-nodeJS alternatives?
jongoldalmost 13 years ago
On the same network? Assuming you're running a server can't you just got to your local IP:port? (or bazookaBen.local:port on a Mac)
bazookaBenalmost 13 years ago
also found Drive-In, which runs on Apache+PHP <a href="https://github.com/scottjehl/Drive-In" rel="nofollow">https://github.com/scottjehl/Drive-In</a>