New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-admin-block

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-admin-block

Admin page for Express + Mongoose to monitor your app send updates to users

  • 0.4.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

express-admin-block

npm version

Still in alpha testing.

A simple Express (4.0+) middleware for rendering an admin page, directly connected to your MongoDB database.

Current user is checked with req.user

The goal is to be a drop-in admin panel for Express apps.

You can add custom fields and will soon be able to add custom charts.

Made with Bootstrap 4, DataTables and Chart.JS.

Features

  • Render a table for your data
  • Choose fields to display
  • View complete user data object
  • Chart for evolution over time
  • Broadcast: send emails to all users
  • Send email to select users
  • Edit select users

Who uses it?

NucleusElioPayBackeryLitch.app

👋 Want to be listed there? Contact me.

Usage

Install the library

npm i express-admin-block

Include it in your app like this:

db represents an object of Mongoose schemas.


app.use('/admin', require('express-admin-block')({
	adminEmails: ['webmaster@website.com'], // User needs to be logged in 
	data: [{
		name: 'Users',
		type: 'mongoose',
		mongo: db.User,
		toShow: ['email', 'registered', 'plan'],
		dateField: 'registered'
	}, {
		name: 'Apps',
		type: 'mongoose',
		mongo: db.TrackedApp,
		toShow: ['name', 'created', { // Can either be strings (properties of your documents) or objects that include a 'render' **async** function
			name: 'Parent user':
			render: async (app) => {
				let user = await db.User.findById(app.parentUser).exec()
				return user.email
			}
		}],
		dateField: 'created'
	}]
}))

FAQs

Package last updated on 10 Mar 2020

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