qsrv
Quick web development server with live reloading and zero runtime dependencies.
Please note that the qsrv
web server is intended for rapid and iterative
development -- not for deployment! Deploy using your favorite static web
server and good DevSecOps practices.
See SPMDA for specific use of qsrv
with web components and rapid idea
sketching on the web.
Quick start
> lsindex.htmldocs/ > npx qsrv Quick Dev Server root: . fallback: index.html http://127.0.0.1:8080/ http://10.0.0.5:8080/ [QSRV change detected][QSRV change detected]
Web API
Use live reloading on non-fallback pages by referencing the livereload script
...
/livereload
-- Server Sent Event endpoint for live reload change notifications/livereload.js
-- qsrv page reload script; this code is injected dynamically into fallback html.
window window window
Node API
See API example
{ return // simple path watch './docs' // or detailed // root: directory to watch for changes root: './other-docs' // file: output json file path to write to file: './list-other.json' // accept: filter function based on file name fname // on_refresh: change refresh; results are written as JSON to 'file' { console return ls_entries } }