Skip to content

A simple express based admin middleware for sequelizejs

Notifications You must be signed in to change notification settings

giladno/sequelize-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sequelize-admin

Install

npm install @giladno/sequelize-admin

Usage

const Sequelize = require('sequelize');
const admin = require('@giladno/sequelize-admin');

const sequelize = new Sequelize(...);

...

app.use('/admin', admin(sequelize, opt));

Options

{
    // `limit` is the number of records to return per page
    limit = 50,

    // `include` will only include a set of specific fields from the model: {include: {User: ['id', 'title']}}
    include = {},

    // `exclude` will omit a set of fields from the model: {exclude: {User: ['password']}}
    // to omit the entire model, set it to `true`: {exclude: {SensitiveTable: true}}
    exclude = {},

    // `title` will set the <title> tag
    title = 'Sequelize Admin',

    // `logo` url for a custom logo
    logo,

    // https://getbootstrap.com/docs/4.0/components/navbar/#color-schemes
    navbar = 'light',

    // `backgroundColor` will set the background color of the navigation bar
    backgroundColor = '#e3f2fd',
}

About

A simple express based admin middleware for sequelizejs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published