Skip to content

Simple development server with live-reload capability for Julia.

License

Notifications You must be signed in to change notification settings

JuliaDocs/LiveServer.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Server for Julia

Status (Linux/Mac) Status (Windows) Coverage Docs
Build Status AppVeyor codecov.io dev-doc

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.

Installation

The package is currently unregistered. To install it in Julia ≥ 1.0, use the package manager with

] add https://github.com/asprionj/LiveServer.jl

Usage

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.