🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

halifier-sequelize

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

halifier-sequelize

sequelize adapters for halifier library

0.0.6
latest
Source
npm
Version published
Weekly downloads
7
-46.15%
Maintainers
1
Weekly downloads
 
Created
Source

halifier-sequelize

extension of halifier containing extra functionality and helpers for integration with sequelize

Features

  • generation of HAL responses based on sequelize models
  • building SQL queries based on _listMeta object
  • a ready-to-go controller bound with sequelize model and providing basic HAL interface for fetching single or a list of entities

Install

npm install --save halifier-sequelize

Usage

const sequelize = someFunction(/* setup connection, define models */)

const app = require('express')()

// halifier expects app dependencies to be injected into app.context
// as if it were koa
app.context = {sequelzie}

const {SequelizeHalController} = require('halifier-sequelize')

const peopleController = new SequelizeHalController(app, {
  model: sequilize.model('Human')
})
app.use('/people', peopleController.expressRouter())

FAQs

Package last updated on 21 Apr 2017

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