Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Elefrant/elefrant-response

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elefrant Response

wercker status

Dependency Status

Formatter for responses. Create a formatter for each type of Content-Type

Install

$ elefrant install elefrant-response

Config

Copy codes.js from ./components/elefrant-response to main config folder.

Usage

Activate the component.

Create your own formatter:

  • Create new file in elefrant-response/lib/format/json.js
  • Develop the code:
return function customizedFormatJSON(req, res, body) {
	...
	return data;
}

License

MIT © Elefrant