Formatter for responses. Create a formatter for each type of Content-Type
$ elefrant install elefrant-responseCopy codes.js from ./components/elefrant-response to main config folder.
Activate the component.
Create your own formatter:
- Create new file in
elefrant-response/lib/format/json.js - Develop the code:
returnfunctioncustomizedFormatJSON(req,res,body){
...
returndata;}MIT © Elefrant