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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dobschal/express-cms

v1.0.9

Published

Simple ExpressJS CMS with an editor interface.

Readme

🧘‍♂️ Express CMS

👉 A simple CMS implementation for ExpressJS. It provides an admin UI to manage content. All content is stored in JSON files on the server and can be accessed easily. This CMS is designed to be simple and easy to use, making it a great choice for small projects or prototypes.

NPM

Get Started

Installation

npm install --save @dobschal/express-cms

Usage

Import and run the cms setup function with a configuration object that defines your models:

import express from 'express';
import cms from '@dobschal/express-cms';

const app = express()
cms(app, {
    models: {
        concerts: {
            title: "text",
            date: "date",
            __public: true // this will make the data publicly accessible
        }        
    }
});
app.listen(3000, () => console.log("Server running on http://localhost:3000"));

Open Admin UI

Open your browser and navigate to http://localhost:3000/express-cms to access the CMS interface.

Retrieve Data

There are two ways to retrieve data from the CMS. From the client side you can fetch the JSON files directly if the model is marked as public. From the server side you can read the data and use it e.g. to server side render it.

Server Side

You can access the data from the server side by importing the readData function from the CMS module. This function returns an array of items of the specified model. If you pass the id parameter, it will return a single item with that id.

Read all items:

import { readData } from '@dobschal/express-cms';
// ...

app.get('/concerts', async (req, res) => {
    const concerts = await readData('concerts');
    return res.send(concerts); // or render view
});

Read a single item by ID:

import { readData } from '@dobschal/express-cms';
// ...

app.get('/concerts/:id', async (req, res) => {
    const concert = await readData('concerts', req.params.id);
    return res.send(concert); // or render view
});

Marking Models as Public

To make a model publicly accessible, you can set the public property to true in the model configuration. This will allow the data to be served as JSON files.

cms(app, {
    models: {
        concerts: {
            title: "text",
            date: "date",
            __public: true // This model is publicly accessible
        }        
    }
});

When a model is marked as public, the CMS will automatically create a JSON file for it under /express-cms/data/{modelName}.json.

Client Side

The JSON files are public available under /express-cms/data/{modelName}.json. You can fetch them using the Fetch API or any HTTP client.

fetch('/express-cms/data/concerts.json')
    .then(response => response.json())
    .then(data => {
        console.log(data); // Array of concert objects
    });

Model Types

Models must be flat objects with the following property types:

  • text: A simple text field.
  • longtext: A long text field, which can be used for larger text content.
  • date: A date field, which can be used to store dates.
  • number: A number field, which can be used to store numeric values.
  • boolean: A boolean field, which can be used to store true/false values.
  • file: A file field, which can be used to upload files.
  • image: An image field, which can be used to upload images. This automatically creates a 300x300 thumbnail.

Example:

cms(app, {
    models: {
        concerts: {
            title: "text",
            date: "date",
            price: "number",
            bill: "file",
            isSoldOut: "boolean",
            poster: "image"
        }        
    }
});