API Reference
svrx(option)
Get the instance of Svrx
Usage
Param
option: see option reference
Return
the instance of Svrx
server.start()
Start svrx
Usage
Return
Promise
server.close()
Usage
Param
Return
Promise
server.reload()
Manually refresh the browser
Usage
server.on
Attach event listener
builtin events
1. ready
ready
Emit when svrx start
2. plugin
plugin
Emit after plugin building, as same as hook.onCreate
, see How to create plugin for more details
3. file:change
file:change
emit after file change (make sure that livereload is enable)
server.off
unbind specific event
server.emit
Last updated