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

admin-panel

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

admin-panel

Admin-panel for projects based on Express.js and Mongoose.

  • 1.2.0-beta2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-44.44%
Maintainers
2
Weekly downloads
 
Created
Source

NOT FOR PRODUCTION!!!

Requirements:

  • Your app must use own bodyParser, cookieParser, session, postNormalize:

      app.use(bodyParser.json());
      app.use(bodyParser.urlencoded({ extended: true }));
      app.use(cookieParser());
      app.use(session({
        secret: config.get('sessionSecret'),
        resave: true,
        saveUninitialized: false,
        store: sessionStore
      }));
      app.use(postNormalize);
      
    

    Where postNormalize must parse multipart/form-data request body and populate req.body and req.files properties.

  • Your app must pass session to res.locals.session:

      app.use(function(req, res, next) {
        res.locals.session = req.session;
        next();
      });
    
  • Your app must use Jade view engine:

      app.set('view engine', 'jade');
    

Installation:

  • Install package: npm install admin-panel --save

  • Create admin-config.js and describe your models.

  • Setup:

      var express = require('express'),
          models = require('./models'),
          adminConfig = require('./admin-config.js'),
          adminPanel = require('admin-panel')({
            express: express,
            models: models,
            adminConfig: adminConfig,
            storagePath: path.join(__dirname, '../..', 'public/storage')
          });
      
      router.use('/admin', adminPanel);
    

    Examples of models and admin-config.js in examples/ folder.

Keywords

FAQs

Package last updated on 17 Aug 2018

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