adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

LAN access for Live Preview ! #6424

Open hyingreborn opened 10 years ago

hyingreborn commented 10 years ago

I use brackets on mac encoding, when i open the live preview, it only be viewed in the local browser, On other PC on the LAN, I access mac ip address : port number, it does not work

njx commented 10 years ago

Marking move to backlog, since we don't support launching/connecting to a browser on a different machine. @hyingreborn, could you describe in more detail why you'd want to do this? Is it that you're doing development on one platform and want to preview how the file looks on a different platform?

hyingreborn commented 10 years ago

In most cases, I have developed web on the mac, and then check the compatibility ie use on another PC; Sometimes, I also hope that my colleagues in real-time preview to my work

njx commented 10 years ago

Makes sense. Thanks for the clarification.

jonthesquirrel commented 10 years ago

@hyingreborn While the live preview is nice for designing layout/style changes, I find it is usually much more practical, especially when working with Javascript, to create a static local web server and just refresh the browser to see changes (I think there are extensions that do this automatically?). That way it is possible to view the project from any browser on the local network, for example Mobile Safari on an iPad, rather being limited to Chrome on the same machine.

Here is a quick solution I use:

cd /path/to/project

ciberado commented 10 years ago

Actually I would find it very handy in order to be able to just click the "send to phone" button in my desktop chrome and perform a quick check of the current status of the page in the mobile device.

valikron commented 10 years ago

+1 it should be enough simply to change the ip from 127.0.0.1 to 0.0.0.0

jasonflaherty commented 9 years ago

I would be very interested in the "send to phone" functionality! :) I have tested visiting the 127.0.0.1 over my local network on my other devices without success...

hibiyasleep commented 9 years ago

any update about this?

nethip commented 9 years ago

@hibiyasleep @jasonflaherty @krevativ @ciberado @hyingreborn With our CC 2015 release, we have introduced a new cloud based service that allows precise preview of webpages on different mobile devices. This currently can be used from within Dreamweaver and Photoshop CC 2015. Please check out this video.

Does it make sense to have this service inside Brackets? By the way I have created a trello card to have this service integrated with Brackets.

Please upvote this trello card which will help us in prioritization. Thanks!

tonygon commented 8 years ago

If you have ssh available you can just forward the ports to which Brackets outputs the live preview.

  1. Run live preview in your localhost once, notice the port number 127.0.0.1:port_num/index.html
  2. Run ssh -N -L port_num:localhost:port_num (you can choose the second port, read man ssh)
  3. Enter your ssh password and voila. You can access 127.0.0.1:port_num/index.html in the remote computer.

The issue is that the page won't reload automatically as the local live preview.

Hope that helps!

ciberado commented 8 years ago

Nice trick!

El jue., 26 may. 2016 a las 17:33, tonygon (notifications@github.com) escribió:

If you have ssh available you can just forward the ports to which Brackets outputs the live preview.

  1. Run live preview in your localhost once, notice the port number 127.0.0.1:port_num/index.html
  2. Run ssh -N -L port_num:localhost:port_num (you can choose the second port, read man ssh)
  3. Enter your ssh password and voila. You can access 127.0.0.1:port_num/index.html in the remote computer.

The issue is that the page won't reload automatically as the local live preview.

Hope that helps!

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/adobe/brackets/issues/6424#issuecomment-221906767

NicoGrapsas commented 7 years ago

Hi! I've found an easy way to accomplish this functionality. I did it with sublime text because it's faster:

1 - Open in your text editor the entire Brackets folder. 2 - Search and replace 127.0.0.1 and localhost with your local ip. 3- Add "livedev.multibrowser": true to preferences file. 4 - Enjoy!

After that you can connect without problems. Page will reload automatically as expected. As far as i've tested it didn't show any console errors. Tested on: Windows 10 x64.

UPDATE: Page reload works on Chrome android too!

mxa commented 7 years ago

@NicoGrapsas open the whole /opt/brackets folder in Sublime? How? There are a lot of binaries in there, no point in searching through those.

mxa commented 7 years ago

If you are on Linux you can just fire up an webserver with python3 -m http.server 8089 in the directory (you can choose the port number, need root for ports <1024