Skip to content

Commit

Permalink
Merge pull request #18 from vincent178/master
Browse files Browse the repository at this point in the history
add two proxy methods and fix typo
  • Loading branch information
Romakita authored Dec 20, 2016
2 parents 168ced9 + a386f78 commit 1924fd2
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions src/server/server-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export interface IServerLifecycle {
}

/**
* ServerLoader provider all method to instanciate an ExpressServer.
* ServerLoader provider all method to instantiate an ExpressServer.
*
* It provide some features :
*
* * Middleware importation,
* * Scan directory. You can specify controllers and services directory in your project,
* * Error management (GlobalErrorHandler),
* * Authentification strategy.
* * Authentication strategy.
*
*/
export abstract class ServerLoader {
Expand Down Expand Up @@ -150,6 +150,32 @@ export abstract class ServerLoader {
return this;
}

/**
* Proxy to express set
* @param setting
* @param val
* @returns {ServerLoader}
*/
public set(setting: string, val: any): ServerLoader {

this.expressApp.set(setting, val);

return this;
}

/**
* Proxy to express engine
* @param ext
* @param fn
* @returns {ServerLoader}
*/
public engine(ext: string, fn: Function): ServerLoader {

this.expressApp.engine(ext, fn);

return this;
}

/**
* Initialize configuration of the express app.
*/
Expand Down

0 comments on commit 1924fd2

Please sign in to comment.