Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class FrugalWatcherServer
import { FrugalWatcherServer } from "https://deno.land/x/frugal@0.2.1/packages/frugal_oak/watch/FrugalWatcherServer.ts";

Wrap a FrugalServerBuilder in a watcher instance. Internally, this class will spawn a child deno process in watch mode actually running the FrugalServerBuilder and the produced instance. On each application reload, an event will be dispatched to a LiveReloadClient, triggering a browser refresh.

Constructors

new
FrugalWatcherServer(builder: FrugalServerBuilder)

Methods

watch(paths: string[])

start the watch process. By default all modules in the dependency graph are watched (see https://deno.land/manual/getting_started/command_line_interface#watch-mode). If you want to watch additionnal files/folders, pass them to the paths option.