marp-cli icon indicating copy to clipboard operation
marp-cli copied to clipboard

Can't use server autoreloader when not running on localhost

Open ThiefMaster opened this issue 2 years ago • 1 comments

It looks like the live reload of the marpit server always tries to connect to localhost. This doesn't work if you use a different hostname. Especially in the era of remote editing this is not uncommon. It would be nice if:

  • the current hostname used to access the server was used instead of the hardcoded localhost
  • ideally the same port was used for the websocket instead of a different port (just use a subpath like /live-reload-ws)

By doing so it would work on localhost but also any thing else. For example in my own environment I run on https://marp.mydevhost.mydomain (I have a wildcard cert and nginx forward that subdomain to the marpit server), but by doing so I lose the reloader functionality...

ThiefMaster avatar Mar 18 '23 18:03 ThiefMaster

Marpit framework does never provide any HTTP/WebSocket server. I've transferred the issue to Marp CLI. :truck:

yhatt avatar Mar 19 '23 03:03 yhatt