sd

sails-devnull

Non-persistent out-memory adapter for Sails.js / Waterline

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

39.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

image_squidhome@2x.png

sails-devnull

Status

Stability: 1 - Experimental

Purpose

/dev/null adapter for Sails

Wait WAT?!

These aren't the datas you're looking for

Thoughts

Responsibility segregation style

FooBarCommand.create(req.params.all(), function(err, sanitized_data) {

  if (err) {
    return res.json({
      status: 'error',
      error: err
    });
  }

  // send `sanitized_data` elsewhere

});
api/models/foo/FooBarCommand.js
module.exports = {

  adapter: 'devnull',

  autoUpdatedAt: false,
  autoPK: false,
  schema: true,

  attributes: {
    id: {
      type: 'uuidv4',
      required: true,
      primaryKey: true
    },
    name: 'string',
    timestamp: 'datetime'
  }
};

Request validator module

Hook to validate on the request level: https://github.com/Josebaseba/sails-hook-validator

Other patterns

Who knows..

About Sails.js

http://sailsjs.com

About Waterline

Waterline is a new kind of storage and retrieval engine. It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get users, whether they live in mySQL, LDAP, MongoDB, or Facebook.

githalytics.com alpha

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial