Socket
Socket
Sign inDemoInstall

sails-emberjs-responses

Package Overview
Dependencies
2
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sails-emberjs-responses

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


Version published
Maintainers
2
Install size
923 kB
Created

Readme

Source

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

FAQs

Last updated on 16 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc