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

nhb-express

v2.1.13

Published

Express TypeScript Server Scaffold

Readme

🚀 Scaffold Express + TypeScript Server

Quickly bootstrap a production‑ready Express + TypeScript + Zod server with a single command.

3 Built-in templates for MongoDB + Mongoose, PostgreSQL + Prisma and PostgreSQL + Drizzle

⚡ Compatibility

✅ Requirements

  • Node.js 22 or newer
  • Stable internet connection
  • npm, pnpm, or yarn for installation

✨ Features

  • TypeScript with ts-node and nodemon for development and pre-configured tsconfig.json
  • Express.js pre‑configured with custom middlewares
  • Zod for schema validation
  • Mongoose for MongoDB integration
  • Drizzle and/or Prisma for PostgreSQL integration
  • Stylog from nhb-toolbox for colorful logging
  • nhb-scripts for easy build, commit, module scaffolding, formatting, linting, and more
  • Scaffolding via CLI – choose package manager, DB, ORM/ODM etc.
  • ✅ Built‑in CI/CD workflow for automatic deployment to Vercel (Currently only available for Mongoose setup)

📦 Usage

You don’t need to install anything globally. Run directly with your favorite package manager:

# Using npx
npx nhb-express@latest

# Using pnpm
pnpm dlx nhb-express@latest

# Using yarn
yarn dlx nhb-express@latest

Follow the interactive prompts:

  • Choose a project name
  • Select a database (MongoDB default)
  • Pick your package manager

Your new server will be scaffolded in the chosen folder with all dependencies installed.


🚀 Quick Start

After running the CLI:

cd <your-project-name>
pnpm dev     # or npm run dev / yarn dev
# Runs on port: 4242

📁 Project Structure

Mongoose

📁 <your-project-name>/
 ├─ 📁 .github/
 │   └─ 📁 workflows/
 │       └─ ⚙️ publish.yml     # GitHub Actions workflow for CI/CD (vercel deployment) 
 │
 ├─ 📁 .vscode/
 │   ├─ 📄 extensions.json     # Recommended Extensions for VS Code
 │   └─ 📄 settings.json       # VS Code Settings for better formatting
 │
 ├─ 📁 public/                 # Folder contains static files
 |   └─ 🖼️ favicon.png         # Favicon to show in client application(s) if supported, e.g. Browsers
 │
 ├─ 📁 scripts/                # Helper scripts for development purpose
 │
 ├─ 📁 src/
 │   ├─ 📁 app/                # All source (*.ts) files
 │   |   ├─ 📁 classes/        # Utility classes e.g. `QueryBuilder`, `ErrorWihStatus`
 │   |   ├─ 📁 configs/        # App configurations
 │   |   ├─ 📁 constants/      # Constant values
 │   |   ├─ 📁 errors/         # Custom error processors/handlers
 │   |   ├─ 📁 middlewares/    # Custom Express middlewares
 │   |   ├─ 📁 modules/        # Feature modules (controllers, services, etc.)
 │   |   ├─ 📁 routes/         # Route definitions
 │   |   ├─ 📁 types/          # Types for the App
 │   |   └─ 📁 utilities/      # Helper functions
 │   |
 │   ├─ 📄 app.ts              # Express app setup
 │   ├─ 📄 index.d.ts          # Global type declarations
 │   └─ 📄 server.ts           # Server bootstrap
 │
 ├─ 🔒 .env                    # Environment variables
 ├─ 🚫 .gitignore              # Ignore files/folders from being pushed/committed
 ├─ 🚫 .prettierignore         # Ignore files/folders from being formatted with prettier
 ├─ ⚙️ .prettierrc.json        # Prettier config
 ├─ ⚙️ eslint.config.mjs       # ESLint config (flat config, ready for TS)
 ├─ ⚙️ nhb.scripts.config.mjs  # Config for nhb-scripts
 ├─ ⚙️ nodemon.json            # Nodemon config
 ├─ ⚙️ package.json            # Auto-generated `package.json`
 ├─ 📃 README.md               # This file
 ├─ ⚙️ tsconfig.json           # Ready to use tsconfig
 └─ ⚙️ vercel.json             # Deployment config for Vercel

Prisma

📁 <your-project-name>/
 ├─ 📁 .vscode/
 │   ├─ 📄 extensions.json     # Recommended Extensions for VS Code
 │   └─ 📄 settings.json       # VS Code Settings for better formatting
 │
 ├─ 📁 prisma/
 │   └─ 📄 schema.prisma       # Prisma Schema file
 │
 ├─ 📁 public/                 # Folder contains static files
 |   └─ 🖼️ favicon.png         # Favicon to show in client application(s) if supported, e.g. Browsers
 │
 ├─ 📁 scripts/                # Helper scripts for development purpose
 │
 ├─ 📁 src/
 │   ├─ 📁 app/                # All source (*.ts) files
 │   |   ├─ 📁 configs/        # App configurations (CORS, Database, ENV etc.)
 │   |   ├─ 📁 constants/      # Constant values
 │   |   ├─ 📁 errors/         # Custom error Class/processors/handlers
 │   |   ├─ 📁 middlewares/    # Custom Express middlewares
 │   |   ├─ 📁 modules/        # Feature modules (controllers, services, etc.)
 │   |   ├─ 📁 routes/         # Route definitions
 │   |   ├─ 📁 types/          # Types for the App
 │   |   └─ 📁 utilities/      # Helper functions
 │   | 
 │   ├─ 📁 prisma/             # Prisma Client generated files
 │   |
 │   ├─ 📄 app.ts              # Express app setup
 │   ├─ 📄 index.d.ts          # Global type declarations
 │   └─ 📄 server.ts           # Server bootstrap
 │
 ├─ 🔒 .env                    # Environment variables
 ├─ 🚫 .gitignore              # Ignore files/folders from being pushed/committed
 ├─ 🚫 .prettierignore         # Ignore files/folders from being formatted with prettier
 ├─ ⚙️ .prettierrc.json        # Prettier config
 ├─ ⚙️ eslint.config.mjs       # ESLint config (flat config, ready for TS)
 ├─ ⚙️ nhb.scripts.config.mjs  # Config for nhb-scripts
 ├─ ⚙️ nodemon.json            # Nodemon config
 ├─ ⚙️ prisma.config.ts        # Prisma config
 ├─ ⚙️ package.json            # Auto-generated `package.json`
 ├─ 📃 README.md               # Instructions and information
 ├─ ⚙️ tsconfig.json           # Ready to use tsconfig
 └─ ⚙️ vercel.json             # Deployment config for Vercel

Drizzle

📁 <your-project-name>/
 ├─ 📁 .vscode/
 │   ├─ 📄 extensions.json     # Recommended Extensions for VS Code
 │   └─ 📄 settings.json       # VS Code Settings for better formatting
 │
 ├─ 📁 migrations/             # Migration files (will be) generated by drizzle-kit 
 │
 ├─ 📁 public/                 # Folder contains static files
 |   └─ 🖼️ favicon.png         # Favicon to show in client application(s) if supported, e.g. Browsers
 │
 ├─ 📁 scripts/                # Helper scripts for development purpose
 │
 ├─ 📁 src/                    # All source (*.ts) files
 │   ├─ 📁 app/                # Application logic and internal configs
 │   |   ├─ 📁 configs/        # App configurations (CORS, ENV etc.)
 │   |   ├─ 📁 constants/      # Constant values
 │   |   ├─ 📁 errors/         # Custom error Class/processors/handlers
 │   |   ├─ 📁 middlewares/    # Custom Express middlewares
 │   |   ├─ 📁 modules/        # Feature modules (controllers, services, etc.)
 │   |   ├─ 📁 routes/         # Route configuration
 │   |   ├─ 📁 types/          # Types for the App
 │   |   └─ 📁 utilities/      # Helper functions
 │   |
 │   ├─ 📁 drizzle/            # Drizzle schema and initialization
 │   |   ├─ 📁 schema/         # Contains drizzle schemas
 │   |   └─ 📄 index.ts        # Drizzle initialization with all schemas
 │   |
 │   ├─ 📄 app.ts              # Express app setup
 │   ├─ 📄 index.d.ts          # Global type declarations
 │   └─ 📄 server.ts           # Server bootstrap
 │
 ├─ 🔒 .env                    # Environment variables
 ├─ 🚫 .gitignore              # Ignore files/folders from being pushed/committed
 ├─ 🚫 .prettierignore         # Ignore files/folders from being formatted with prettier
 ├─ ⚙️ .prettierrc.json        # Prettier config
 ├─ ⚙️ drizzle.config.ts       # Drizzle config
 ├─ ⚙️ eslint.config.mjs       # ESLint config (flat config, ready for TS)
 ├─ ⚙️ nhb.scripts.config.mjs  # Config for nhb-scripts
 ├─ ⚙️ nodemon.json            # Nodemon config
 ├─ ⚙️ package.json            # Auto-generated `package.json`
 ├─ 📃 README.md               # Instructions and information
 ├─ ⚙️ tsconfig.json           # Ready to use tsconfig
 └─ ⚙️ vercel.json             # Deployment config for Vercel

⚙️ CI/CD Workflow

A ready‑to‑use GitHub Actions workflow is included in:

.github/workflows/publish.yml

What it does:

  • Runs on push to your main branch
  • Builds your project
  • Deploys automatically to Vercel (configured via vercel.json)

How to use:

  1. Push your project to a GitHub repository.
  2. Add your Vercel tokens/secrets as GitHub repository secrets: Go to Settings >> Secrets and variables >> Actions >> Repository secrets and add these variables:
    • VERCEL_ORG_ID
    • VERCEL_PROJECT_ID
    • VERCEL_TOKEN
  3. Every time you push to main and version is updated, GitHub Actions will trigger and deploy your server to Vercel.

You can customize the workflow to fit your own CI/CD needs (e.g., change branches, add tests, deploy elsewhere).


🛠️ nhb-scripts

This project comes integrated with nhb-scripts — a cli package also by Nazmul Hassan:

What you get:

  • npm/pnpm/yarn run build → builds your project
  • npm/pnpm/yarn run commit → guided commit with semantic messages
  • npm/pnpm/yarn run module → scaffolds new modules
  • npm/pnpm/yarn run fix → auto‑fix lint issues
  • npm/pnpm/yarn run format → formats with Prettier
  • and more… configurable via nhb.scripts.config.mjs

You can explore and extend nhb-scripts in your project as needed.


✨ Author

Made with ❤️ by Nazmul Hassan