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

express-instant

v1.1.0

Published

Instant Express — JSON-configured Express server with auth, CRUD templates, WebSockets, and custom handlers.

Readme

Instant Express

Brand: Instant Express · npm: express-instant

JSON-configured Express server — define routes, auth, CRUD, and custom handlers in one config file. Ship a REST API without boilerplate.

Live demo: express-instant.vercel.app

Why this exists

| Tool | What it does | |------|----------------| | JSON Server | Mock API from a data JSON file | | PocketBase | Full backend platform with admin UI | | Instant Express | Route config JSON + templates + escape hatches — you stay on Express |

Not a game backend (Nakama). Not a mock server. A composable library for real small APIs.

Install

npm install express-instant

Quick start (CLI)

cp slices.example.json my-api.json
cp .env.example .env
npx express-instant --config-file my-api.json

Or add to package.json:

{
  "scripts": {
    "start": "express-instant --config-file my-api.json"
  }
}

Quick start (library)

import { createApp, loadConfigFromFile } from "express-instant";

const config = loadConfigFromFile("./my-api.json");
const app = await createApp(config);
app.listen(3000);

Example config — Todo API with auth

{
  "port": 3000,
  "dotenv": true,
  "cors": true,
  "mongoDB": true,
  "bodyParser": { "json": true },
  "routes": {
    "/health": { "GET": { "type": "template", "template": "health" } },
    "/auth/sign-up": { "POST": { "type": "template", "template": "signUp" } },
    "/auth/sign-in": { "POST": { "type": "template", "template": "signIn" } },
    "/items/:collection": {
      "GET": { "type": "template", "template": "listItems" },
      "POST": {
        "type": "template",
        "template": "listItems",
        "middleware": ["requireAuth"]
      }
    }
  }
}

See slices.example.json for the full copy-paste example.

Route types

| Type | Description | |------|-------------| | template | Built-in handler (health, signUp, signIn, listItems) | | function | Inline handler string | | module | Load a local .js module | | import | Import ES module handler | | static | Serve static files | | routes | Nested router |

Middleware on routes

{
  "POST": {
    "type": "template",
    "template": "listItems",
    "middleware": ["requireAuth"]
  }
}

Built-in templates

| Template | Description | |----------|-------------| | health | { success, status, uptime } | | signUp | Register user → MongoDB + bcrypt + JWT | | signIn | Login → JWT | | listItems | In-memory CRUD on /items/:collection | | mongoItems | MongoDB CRUD on /db/:collection (requires mongoDB: true) |

WebSockets

{
  "websockets": {
    "/ws": { "template": "echo" }
  }
}

Built-in echo template sends { type: "connected" } on connect and echoes messages back.

Built-in middleware

| Middleware | Description | |------------|-------------| | requireAuth | Validates Authorization: Bearer <jwt> |

Extend the library

import { registerTemplate, registerMiddleware } from "express-instant";

registerTemplate("myHandler", (req, res) => res.json({ ok: true }));
registerMiddleware("adminOnly", (req, res, next) => { /* ... */ next(); });

Environment variables

MONGODB_STRING=mongodb://localhost:27017
MONGODB_NAME=express-instant
JWT_SECRET=change-me-in-production
EXPRESS_INSTANT_CONFIG=./my-api.json
PORT=3000

Development

git clone https://github.com/m3yevn/express-instant.git
cd express-instant
npm install
npm run dev
npm test

License

MIT © Kevin Moe Myint Myat