Function : monitor

The monitor() function is a live server function. Usually, the Resource class manages live server control. However, the monitor() function make it easier to start live server in routes. It is used in routes to start live server if for a reason, a live template file is inaccessible.

  monitor(); // start live server 
                  

Note that when this function is used, the live server will run before the page is rendered. This may generate some quirks mode error response in console. The best way to start live server to avoid quirks mode error is to start it in template files within html tags using the @live() or @live directive.