-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to make preview work on remote server? #92
Comments
+1 |
btw... I found a pull request on the server repo for this project and someone had made a change to make this work. You can try using that. I also have a fork that has this change and also does not open up a browser automatically (I found that only one browser can connect to the socket at once so if you are trying to open a browser from a local machine of a markdown file on a server, the server would try to open up its own web browser, and if it connects your local browser would not connect. So I just disabled it to make it easier). You can find it here. Feel free to use it, or make the change yourself. The PR I am referring to is here. if you decide to use mine instead, you need to install it again obviously. The npm command would now be |
instant-markdown/instant-markdown-d#29 has been merged which partially solves this. However as @hallzy alludes to you still need a way to prevent the initial browser open. Open to suggestions on how we can improve the experience for this use-case, perhaps allowing multiple sockets/browser windows, so you can open/close browser windows at will and things will still work? |
That is what I would have liked to do, but I am not very familiar with almost any of this so I would not even know where to start. I think being able to open multiple browsers connected to the same socket would be nice. I have not tried to do this through ssh with a computer running something like ubuntu-server though, which to my understanding does not have a web browser, so if we still open up the browser automatically in this situation I don't know what would happen (ie, would it just fail to open, or would it cause the whole thing to fail and we can't even connect from a different computer now?) So if it is determined that we can do this and have no problems, then we can do that, otherwise there may need to be another way to say that we don't want the browser opening up automatically, or at least if it fails to open up a browser, we can still continue. I like the idea of having a tab open up automatically in general so it would be nice to keep that feature I think. We just need a way to make sure that it wont have a negative effect on anything over ssh if we allow multiple browsers to connect to the same socket, or we would need to be able to tell it not to open it. What I personally would like in a perfect world, is the ability to open a number of browsers connected to that socket, and let it try to open up a browser automatically, and if it fails because it is a terminal based OS and does not have a browser, that the application won't fail and I can still connect from another browser. This way I would still have the ability to open a browser automatically, but I can also work over ssh. |
Yes @hallzy what I have in mind is for the server to initiate a new websocket to whatever sends it a I've created a new issue for myself here: instant-markdown/instant-markdown-d#33 |
nice! I look forward to it :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
when I press F12 to activate preview mode, I can visit the webpage though "ip:port", but the page is empty.
The text was updated successfully, but these errors were encountered: