Status (Linux/Mac) | Status (Windows) | Coverage | Docs |
---|---|---|---|
This is a simple and lightweight development web-server written in Julia, based on HTTP.jl. It has live-reload capability, i.e. when changing files, every browser (tab) currently displaying a corresponding page is automatically refreshed.
LiveServer is inspired from Python's http.server
and Node's browsersync
.
The package is currently unregistered. To install it in Julia ≥ 1.0, use the package manager with
] add https://github.com/asprionj/LiveServer.jl
The main function LiveServer
exports is serve
which starts listening to the current folder and makes its content available to a browser.
The following code creates an example directory and serves it:
julia> using LiveServer
julia> LiveServer.example() # creates an "example/" folder with some files
julia> cd("example")
julia> serve() # starts the local server & the file watching
✓ LiveServer listening on http://localhost:8000/ ...
(use CTRL+C to shut down)
Open a Browser and go to http://localhost:8000
to see the content being rendered; try modifying files (e.g. index.html
) to see the changes being rendered immediately in the browser.