Skip to content

giladno/sequelize-admin

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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