abstract const classdraft::DraftMod

sys::Obj
  web::WebMod
    draft::DraftMod

DraftMod

flash

Source

Flash flash()

Get flash instance for this request.

logDir

Source

const File? logDir := null

Directory to write log files to. If left null, no logging will be performed.

logFields

Source

const Str logFields := ...

Format of the web log records as a string of names. See webmod

make

Source

new make()

Constructor.

onAfterService

Source

virtual Void onAfterService(Str:Str args)

Invoked after serviceing the current request.

onBeforeService

Source

virtual Void onBeforeService(Str:Str args)

Invoked prior to serviceing the current request.

onErr

Source

virtual Void onErr(DraftErr err)

Handle an error condition during a request.

onService

Source

virtual override Void onService()

Service incoming request.

onStart

Source

virtual override Void onStart()

Handle startup tasks.

pubDir

Source

const File? pubDir := null

Directory to publish as public files under /pub/ URI:

pubDir := `/foo/bar/`
/foo/bar/index.css     =>  `/pub/index.css`
/foo/bar/img/logo.png  =>  `/pub/img/logo.png`

The pubDir may also be defined as a config property in etc/draft/config.props

router

Source

const Router router

Router model.