0.2.2 • Published 9 years ago

sails-emberjs-responses v0.2.2

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Sails Ember.js Responses

A pack to change default sails.js responses to ember.js compatible responses

It comes with a custom sails.js hook how parses que controller result in res.ok and format the response based in req.options and add res.emberjs() function to respond requests with ember.js format if you dont whant to use default res.ok()

Installation

1 - Download it inside your sails.js project with:

npm install sails-emberjs-responses --save

2 - Create one hook with:

// api/hooks/emberjs/index.js

module.exports = require('sails-emberjs-responses').hook;

3 - In your controllers use:

// ... controller logic
res.ok(record);

Configs:

Enable of disable module res.ok ( boolean )

sails.config.emberjs.loadDefaultOkResponse

ROADMAP:

  • ADD suport to res.negotiate custom responses
  • ADD suport to res.serverError custom responses
  • ADD suport to others formats
  • ADD more configs

Credits

Alberto Souza and contributors - MIT

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

10 years ago