Mvc

Moduleejs.web
Definition class Mvc
InheritanceMvc inherit Object
Specifiedejscript-2.5
StabilityPrototype.

The Mvc class manages the loading and initialization of MVC web applications.


Properties

QualifiersPropertyTypeDescription

Mvc Class Methods

QualifiersMethod
static load(request: Request, dir: Path = ., config = expression): Mvc
 Factory to load an MVC application.

Mvc Instance Methods

QualifiersMethod
Mvc(home: Path, config = expression)
 Load an MVC application and the optional application specific ejsrc file.
loadComponent(request: Request, mod: Path, files: Array = null, deps: Array = null)
 Load a component.

Method Detail

ejs.web Mvc(home: Path, config = expression)
Description
Load an MVC application and the optional application specific ejsrc file.
Parameters
home: Path Base directory for the MVC app.
config Configuration object 8. [default: expression]

static load(request: Request, dir: Path = ., config = expression): Mvc
Description
Factory to load an MVC application.
Parameters
request: Request Request object.
dir: Path Base directory containing the MVC application. Defaults to ".". [default: .]
config Default configuration for the application. [default: expression]
Returns
An Mvc application object.

loadComponent(request: Request, mod: Path, files: Array = null, deps: Array = null)
Description
Load a component. This will load a module and optionally recompile if the given dependency paths are more recent than the module itself. If recompilation occurs, the result will be cached in the supplied module.
Parameters
request: Request Request object.
mod: Path Path to the module to load.
files: Array Files to compile into the module. [default: null]
deps: Array Extra file dependencies. [default: null]