Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

express-admin-page

vincelwt15MITdeprecated0.3.3

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

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

readme

express-billing-page

Still in alpha testing.

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

Made with Bootstrap 4, DataTables and Chart.JS.

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.

Features

  • <input checked="" disabled="" type="checkbox"> Render a table for your data
  • <input checked="" disabled="" type="checkbox"> Choose fields to display
  • <input checked="" disabled="" type="checkbox"> Chart for evolution over time
  • <input checked="" disabled="" type="checkbox"> Broadcasting function: send emails to all users
  • <input disabled="" type="checkbox"> Broadcast emails to select users
  • <input disabled="" type="checkbox"> Edit select users

Usage

Install the library

npm i express-admin-page

Server code:

app.use('/admin', require('express-admin-page')({
    adminEmails: ['webmaster@website.com'],
    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'
    }]
}))