Static Member Summary
Static Public Members | ||
public static get |
Returns the current Trek environment
|
|
public static get |
isDevelopment: Boolean: * Returns true if current environment is `development`
|
|
public static get |
isProduction: Boolean: * Returns true if current environment is `production`
|
|
public static get |
Returns true if current environment is `test`
|
|
public static get |
logger: winston.Logger: * Gets Trek's logger
|
|
public static set |
Sets Trek's logger
|
|
public static get |
Returns Trek package information
|
|
public static get |
Returns Trek current version
|
Inherited Summary
From class Engine | ||
public get |
logger: winston.Logger: * The app `logger`
|
|
public get |
Get the app prefix path
|
|
public get |
The `config.paths` delegation
|
|
public get |
The app working `rootPath` directory
|
|
public set |
Set a working `rootPath` directory for app
|
|
public get |
routeMapper: RouteMapper: * Get route mapper.
|
|
public get |
Get all servides
|
|
public |
body: * |
|
public |
cache: * |
|
public |
config: * |
|
public |
context: * |
|
public |
engines: * |
|
public |
env: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
router: * |
|
public |
server: * |
|
public |
state: * |
|
public |
all(path: String, handler: GeneratorFunction[]): Engine Special-cased "all" method, applying the given route `path`,
middleware, and handler to _every_ HTTP method.
|
|
public |
* bootstrap(): void Boot the app
|
|
public |
engine(ext: String, fn: GeneratorFunction): Engine Register the given template engine callback `fn` * as `ext`.
|
|
public |
Serves the default favicon - GET /favicon.ico
|
|
public |
getService(key: String): * Get a service by key
|
|
public |
Index serves index file
|
|
public |
* loadServices(): void Load services
|
|
public |
match(methods: String[], path: String, handler: GeneratorFunction[]): Engine Match adds a route > handler to the router for multiple HTTP methods provided
|
|
public |
Render `view` with the given `options`
|
|
public |
Run the app
|
|
public |
Serves files from a directory
|
|
public |
Serves a file
|
|
public |
Stores the `value` with `key` into `app.config`
|
|
public |
setService(key: String, service: *): void Stores a service
|
|
public |
Serves static files from a directory.
|
Static Public Members
public static get env: Boolean: * source
Returns the current Trek environment
Override:
Engine#envExample:
Trek.env
// => development | production | test
public static get isDevelopment: Boolean: * source
Returns true if current environment is development
public static get logger: winston.Logger: * source
Gets Trek's logger
Override:
Engine#loggerReturn:
winston.Logger |
public static set logger(logger: Object): void: * source
Sets Trek's logger
Override:
Engine#loggerReturn:
void |