proton-body-parser
v1.0.0
Published
Express body-parser middleware for Protontype
Downloads
24
Maintainers
Readme
Express body-parser middleware for Protontype
This module wraps body-parser Nodejs module for use into a Protontype project
Middlewares
- JsonBodyParserMiddleware: Equivalent to JSON body parser
- RawBodyParserMiddleware: Equivalent to Raw body parser
- TextBodyParserMiddleware: Equivalent to Text body parser
- UrlBodyParserMiddleware: Equivalent to URL-encoded form body parser
How to Use
let app = new ProtonApplication().addMiddlewareAs(JsonBodyParserMiddleware)
app.start();
With options:
let middlewareWithOptions = new JsonBodyParserMiddleware({ type: 'application/*+json' });
let app = new ProtonApplication().addMiddleware(middleware)
app.start();
For all options see:
For how to use middlewares into Protontype see documentation