1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/live-server.md

21 lines
471 B
Markdown
Raw Normal View History

2017-12-10 16:51:53 -06:00
# live-server
> A simple development http server with live reload capability.
2019-06-05 08:55:54 +01:00
> More information: <https://www.npmjs.com/package/live-server>.
2017-12-10 16:51:53 -06:00
- Serve an `index.html` file and reload on changes:
2017-12-10 16:51:53 -06:00
`live-server`
2017-12-13 13:15:59 -06:00
- Specify a port (default is 8080) from which to serve a file:
2017-12-10 16:51:53 -06:00
2017-12-10 21:34:49 -06:00
`live-server --port={{8081}}`
2017-12-10 16:51:53 -06:00
2017-12-10 21:37:01 -06:00
- Specify a given file to serve:
2017-12-10 16:51:53 -06:00
2017-12-10 21:34:49 -06:00
`live-server --open={{about.html}}`
2017-12-10 16:51:53 -06:00
2017-12-10 21:37:01 -06:00
- Proxy all requests for ROUTE to URL:
2017-12-10 16:51:53 -06:00
2017-12-10 21:34:49 -06:00
`live-server --proxy={{/}}:{{http:localhost:3000}}`