npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

redmin

v0.1.1

Published

Admin tool for redis.

Readme

redmin

A web admin for redis.

Current status of the project

The current version of redmin, v0.1.1, is considered to be experimental. Please use it with caution. This status will hopefully change as I use the tool repeatedly and with growing confidence.

Installation

redmin is meant to be used as a complement to a web application based on node.js. To install it: npm install redmin.

The dependencies of redmin are six:

Purpose

redmin is a admin tool for redis meant to be used together with an existing web application also based in redis. This makes redmin very simple for three reasons: 1) the auth/session logic can be delegated to the web application; 2) redis doesn't have to be exposed to the internet; 3) redmin does not need to be hosted independently.

Despite its simplicity, redmin will hopefully replace the redis command line for many operations, saving time and improving the safety of direct database manipulations.

Usage

redmin has to be included within a set of routes within your web application. If your application is exposed to the internet, you should put the redmin routes after a certain user is logged in as an admin - otherwise any user (or anyone) will have direct read and write database to your redis.

To connect redmin to your redis database, assign redmin.redis to your redis instance. For example:

var redis  = require ('redis').createClient ();
var redmin = require ('redmin');
redmin.redis = redis;

The following routes should only be accessible to admin users which are fully trusted.

To serve the HTML for bootstrapping the redmin client in GET /redmin (could be any other route as well), serve the output of redmin.html - this function will generate an HTML page that will load redmin. The function can be invoked without arguments, or with an object with these parameters (all of them optional):

  • pure: path to PureCSS. Defaults to https://unpkg.com/[email protected]/build/pure-min.css.
  • server: path to make queries to redmin. Defaults to redmin.
  • gotob: path to gotoB. Defaults to redmin/gotoB.min.js.
  • client: path to the redmin client. Defaults to redmin/client.js.

To serve gotoB and the redmin client, you'll need to add GET routes for accessing those two static resources.

To allow the client to reach the redmin server, add an endpoint at POST /redmin (or the endpoint you specified in the server parameter passed to redmin.client). This endpoint should invoke redmin.api with two arguments: the body received plus a callback.

If you're using cicek, this is what the redmin routes could look like:

['get', 'redmin', reply, redmin.html ()],
['post', 'redmin', function (rq, rs) {
   redmin.api (rq.body, function (error, data) {
      if (error) return cicek.reply (rs, 500, {error: error});
      cicek.reply (rs, 200, data);
   });
}],
['get', 'redmin/client.js',    cicek.file, 'node_modules/redmin/client.js'],
['get', 'redmin/gotoB.min.js', cicek.file, 'node_modules/gotob/gotoB.min.js'],

Performance

When listing keys, redmin uses scan to incrementally iterate redis keys, so it can be used against large databases in production environments without fear of blocking the database. However, large lists, sets and zsets are retrieved at once instead of being scanned - this should be changed in the future.

Please remember that redmin is experimental, for the time being.

Source code

The complete source code is contained in client.js and server.js. It is about 240 lines long.

Annotated source code will be forthcoming when the library stabilizes.

License

redmin is written by Federico Pereiro ([email protected]) and released into the public domain.