如何在Chrome浏览器中查看在本地机器上运行的网站? [英] How can I view a website running in localhost on machine in chrome browser?

查看:136
本文介绍了如何在Chrome浏览器中查看在本地机器上运行的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个rails web应用程序,目前专注于移动设计,并希望查看我在Galaxy Nexus(运行Jelly Bean)上的移动Chrome浏览器中开发的html屏幕。



在我的MacBook Pro上,显然,我可以运行本地服务器并通过LocalHost:3000 url在我的机器上查看该网站。在我的手机上运行时,是否可以在我的手机/ macbook pro上完成某些网络配置以查看手机上的本地主机网站?是否可以利用Chrome Dev Tools?



例如。



https://开发者。 google.com/chrome/mobile/docs/debugging



无论谁回答这个问题,都可以获得5个冷点。 :)

解决方案

在您的mac上打开您的网络偏好设置(点击顶部的wifi信号)。找到您当前连接到的网络的IP地址。在手机的浏览器中,输入该IP地址并在其后面追加:3000到$

I am working on a rails web app, currently focusing on the mobile design and would like to view html screens I have developed in the mobile chrome browser on my Galaxy Nexus (running Jelly Bean).

On my MacBook Pro I am able, obviously, to run a local server and view the site on my machine via LocalHost:3000 url. Would it be possible to complete some network configuration on my phone/macbook pro to view the Local Host site on my phone when its running on my machine? Could Chrome Dev Tools be leveraged in anyway?

e.g.

https://developers.google.com/chrome/mobile/docs/debugging

+5 cool points for whoever answers this question. :)

解决方案

On your mac go open your network preferences (click the wifi signal at the top). Find the ip address of the network you are currently connected to. In the browser of your phone, type in that ip address and append :3000 to the end of it

这篇关于如何在Chrome浏览器中查看在本地机器上运行的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆