slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
33.34k stars 1.35k forks source link

May i Change localhost to a remote server? #1582

Open mingzailao opened 2 years ago

mingzailao commented 2 years ago

Hope that i can change localhost to a given remote server at the settings.

https://github.com/slidevjs/slidev-vscode/blob/main/src/view/PreviewProvider.ts#L65

mingzailao commented 2 years ago

I installed Slidev on remote server, but i modify the markdown file on my macbook.

preview function can not work.

After i change

const serverAddr = `http://localhost:${config.port}/`

to

const serverAddr = `http://${remotehost}:${config.port}/`

and recomplie it

work well

antfu commented 2 years ago

PR welcome to add a host option, thanks!