Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 179 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"author": "Rogelio Orts",
"license": "MIT",
"devDependencies": {
"@types/aws-lambda": "0.0.16",
"@types/chai": "^4.0.4",
"@types/mocha": "^2.2.43",
"@types/node": "^8.0.28",
Expand All @@ -42,7 +41,10 @@
"typescript": "^2.5.2"
},
"dependencies": {
"@types/aws-lambda": "0.0.16",
"@types/sinon": "^2.3.7",
"accepts": "^1.3.4",
"bytes": "^3.0.0",
"content-type": "^1.0.4",
"cookie": "^0.3.1",
"cookie-signature": "^1.0.6",
Expand All @@ -52,9 +54,13 @@
"logger": "0.0.1",
"mime-types": "^2.1.17",
"path-to-regexp": "^2.0.0",
"qs": "^6.5.1",
"querystring": "^0.2.0",
"randomstring": "^1.1.5",
"sinon": "^4.0.2",
"statuses": "^1.3.1",
"typeis": "^1.1.1",
"utils-merge": "^1.0.1"
"utils-merge": "^1.0.1",
"xml2json": "^0.11.0"
}
}
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ export { default as IHttpRequest } from "./lib/types/http/IHttpRequest";
export { default as IHttpResponse } from "./lib/types/http/IHttpResponse";
export { default as IHttpRoute } from "./lib/types/http/IHttpRoute";
export { default as IHttpRouterExecutor } from "./lib/types/http/IHttpRouterExecutor";

export { default as IBodyParser } from "./lib/types/http/IBodyParser";
export { default as JsonParser } from "./lib/http/bodyParsers/JsonParser";
export { default as MultipartParser } from "./lib/http/bodyParsers/MultipartParser";
export { default as UrlEncodedParser } from "./lib/http/bodyParsers/UrlEncodedParser";
export { default as XmlParser } from "./lib/http/bodyParsers/XmlParser";
2 changes: 1 addition & 1 deletion src/lib/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default class App implements IApp {
}
}

public use(path?: string, ...handler: IHttpHandler[]): IApp {
public use(handler: IHttpHandler|IHttpHandler[], path?: string): IApp {
this._router.use(handler, path);

return this;
Expand Down
Loading