connect-csvboy
Express middleware to check user access based on the ressources URIs and HTTP methods.
Usage
var csvboy = ; // Add the middlewareapp; // Consume the requestapp;
API
reaccess(options)
options
Type: Object
The options of the reaccess middleware.
options.mimes
Type: Array
Default: ['text/csv']
Mime type that csvboy should listen for.
options.methods
Type: Array
Default: ['POST', 'PUT', 'PATCH']
HTTP methods that csvboy should listen for.
options.immediate
Type: Boolean
Default: false
Immediatly pipe the request in the csv parser.
options.csvOptions
Type: Object
The CSV parser options. See the oh-csv README file.