Skip to content

App ​

Class

An app is responsible for handling the API calls and also serving the admin pages. App is designed to be server agnostic and only depends on contexts for processing. Contexts are processed with services but orchestrated with pipelines. In summary, pipelines make sure hooks are called properly and exceptions/ errors are propagated properly.

constructor ​

database ​

errors ​

hooksRegistry ​

manifest ​

admin ​

typescript
public admin(path: Parameter): Promise<any>
public admin(path: Parameter): Promise<any>

after ​

typescript
public after(hooks: Parameter): Promise<any>
public after(hooks: Parameter): Promise<any>

api ​

typescript
public api(ctx: Parameter): Promise<any>
public api(ctx: Parameter): Promise<any>

Passes the context through its pipeline and returns a context with the result. This method is not intended to throw an exception. Exceptions are caught and transformed into readable responses with related status code.

before ​

typescript
public before(hooks: Parameter): Promise<any>
public before(hooks: Parameter): Promise<any>

error ​

typescript
public error(hooks: Parameter): Promise<any>
public error(hooks: Parameter): Promise<any>

installCollection ​

typescript
public installCollection(collection: Parameter): Promise<any>
public installCollection(collection: Parameter): Promise<any>

leave ​

typescript
public leave(path: Parameter): Promise<any>
public leave(path: Parameter): Promise<any>

pipeline ​

typescript
public pipeline(path: Parameter): Promise<any>
public pipeline(path: Parameter): Promise<any>

plug ​

typescript
public plug(plugin: Parameter): Promise<any>
public plug(plugin: Parameter): Promise<any>

runAfter ​

typescript
public runAfter(ctx: Parameter): Promise<any>
public runAfter(ctx: Parameter): Promise<any>

runBefore ​

typescript
public runBefore(ctx: Parameter): Promise<any>
public runBefore(ctx: Parameter): Promise<any>

runError ​

typescript
public runError(ctx: Parameter): Promise<any>
public runError(ctx: Parameter): Promise<any>

serve ​

typescript
public serve(server: Parameter): Promise<any>
public serve(server: Parameter): Promise<any>

service ​

typescript
public service(path: Parameter): Promise<any>
public service(path: Parameter): Promise<any>

use ​

typescript
public use(path: Parameter, handle: Parameter): Promise<any>
public use(path: Parameter, handle: Parameter): Promise<any>
typescript
public use(path: Parameter, service: Parameter): Promise<any>
public use(path: Parameter, service: Parameter): Promise<any>

isDevPath ​

typescript
public isDevPath(path: Parameter): Promise<any>
public isDevPath(path: Parameter): Promise<any>