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

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

问题描述

我正在开发一个 Rails 网络应用程序,目前专注于移动设计,并想查看我在 Galaxy Nexus(运行 Jelly Bean)上的移动 chrome 浏览器中开发的 html 屏幕.

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).

在我的 MacBook Pro 上,显然我能够运行本地服务器并通过 LocalHost:3000 url 在我的机器上查看站点.当它在我的机器上运行时,是否可以在我的手机/macbook pro 上完成一些网络配置以查看我手机上的本地主机站点?无论如何都可以利用 Chrome 开发工具吗?

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?

例如

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

为回答这个问题的人+5 个酷点.:)

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

推荐答案

在你的 Mac 上打开你的网络偏好设置(点击顶部的 wifi 信号).找到您当前连接的网络的 IP 地址.在手机浏览器中输入该IP地址并在其末尾附加:3000

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天全站免登陆