Skip to content

Commit

Permalink
Merge pull request abedev#31 from kLabz/master
Browse files Browse the repository at this point in the history
Added Express.json() for express 4.16.0+
  • Loading branch information
fponticelli authored Sep 8, 2019
2 parents a7bfbbc + 12176ed commit 4d62d41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/express/Express.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package express;

import express.Middleware;
import haxe.extern.Rest;
import mw.bodyparser.JsonOptions;

@:jsRequire("express")
extern class Express extends Route {
Expand Down Expand Up @@ -34,6 +35,7 @@ extern class Express extends Route {
@:overload(function(path : String, router : Router) : Express {})
function use(path : String, callback : EitherMiddleware, callbacks : Rest<Middleware>) : Express;

static function json(?options : JsonOptions) : Middleware;
inline static function serveStatic(root : String, ?options : StaticOptions) : Middleware
return untyped Express["static"](root, options);
}
Expand Down

0 comments on commit 4d62d41

Please sign in to comment.