Skip to content

💫 Node.JS: HTTP resource based in sequelize.

License

Notifications You must be signed in to change notification settings

helderberto/node-rsr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💫 RSR

This is simple Node HTTP resource.

License: MIT

Requirements

Installation

You can get it on npm.

npm install node-rsr --save

Or if you`re not into package management, just download a ZIP file.

Usage

static save(data) {
  return Rsr.save(Model, {
    data: data,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static update(params, data) {
  return Rsr.update(Model, {
    params: params,
    data: data,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static delete(params) {
  return Rsr.delete(Model, {
    params: params,
    error: 'Custom error message (optional)',
    validate: 'Custom validate message (optional)'
  });
}

static findAll(params) {
  return Rsr.findAll(Model, {
    params: params,
    error: 'Custom error message (optional)'
  });
}

static findOne(params) {
  return Rsr.findOne(Model, {
    params: params,
    error: 'Custom error message (optional)'
  });
}

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Changelog

This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the Github Releases page.

Author

Helder Burato

License

MIT License © Helder Burato

About

💫 Node.JS: HTTP resource based in sequelize.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages