Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hapi-sequelize-rest

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-sequelize-rest

RESTful Hapi routes based on sequelize models

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hapi-sequelize-rest

RESTful Hapi routes based on sequelize models

Install

$ npm install hapi-sequelize-rest

Usage

Register your sequelize models with hapi-sequelize and then register hapi-sequelize-rest.

For example, in a manifest:

{
    plugin: {
        register: './models',
        options: {
            uri: Config.get('/database/uri')
        }
    }
},
{
    plugin: {
        register: 'hapi-sequelize-rest',
        options: {
            prefix: '/api/v1',
            readOnly: false
        }
    }
}

Options

  • prefix: You can provide a prefix for your api routes. By default api routes will be registered against the root of your site.

  • readOnly: Set this to a truthy value and hapi-sequelize-rest will only register routes for GET-ing resources.

TODO

  1. Provide an option for authentication.
  2. Add some tests.

License

MIT

FAQs

Package last updated on 14 May 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc