Skip to content

Commit

Permalink
Use options parameter on app constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo Sabattié authored Aug 1, 2018
1 parent aadc189 commit a90ad4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/abe/App.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class App {
public var express(default, null) : Express;

public function new(?options : Options) {
options = null != options ? options : {};
options = null != options ? options : { strictRoute : true, caseSensitiveRouting : true };
express = new Express();

if(options.strictRoute)
express.set("strict route", true);
express.set("strict route", options.strictRoute);
if(options.caseSensitiveRouting)
express.set("case sensitive routing", true);
express.set("case sensitive routing", options.caseSensitiveRouting);

express.set("x-powered-by", false);
}
Expand Down

0 comments on commit a90ad4e

Please sign in to comment.