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

Latest commit

 

History

History
41 lines (23 loc) · 859 Bytes

readme.md

File metadata and controls

41 lines (23 loc) · 859 Bytes

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