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

@mrknown404/create-express-app

v1.0.19

Published

A CLI tool to quickly scaffold an express.js application

Readme

Create Express App

A flexible Express.js project scaffolding tool with optional TypeScript, ESLint, Jest, and more.


🚀 Quick Start

Create a new Express project directly with npx, yarn dlx, pnpm dlx, or bunx:

npx @mrknown404/create-express-app <app-name>

yarn dlx @mrknown404/create-express-app <app-name>

pnpm dlx @mrknown404/create-express-app <app-name>

bunx @mrknown404/create-express-app <app-name>

Or install globally and run:

npm i -g @mrknown404/create-express-app

Then execute:

npx create-express-app <app-name>

yarn dlx create-express-app <app-name>

pnpm dlx create-express-app <app-name>

bunx create-express-app <app-name>

⚡ Features

  • Initialize JavaScript or TypeScript Express projects.

  • Select optional features:

    • ESLint + Prettier
    • Jest testing framework
    • Zod schema validation
  • Automatic project structure creation (src, controllers, routes, schemas).

  • Safe execution with rollback on errors or interruptions.

  • Fully customizable via prompts or programmatic config.


🛠 Installation (Wrapper Usage)

Install the package locally in your project:

npm i @mrknown404/create-express-app

yarn add @mrknown404/create-express-app

pnpm add @mrknown404/create-express-app

bun add @mrknown404/create-express-app

📦 Using ProjectBuilder Programmatically

1️⃣ Using Default Prompts

import { ProjectBuilder } from '@mrknown404/create-express-app';

async function main() {
  const builder = new ProjectBuilder();
  await builder
    .init()         // Initialize project folder & package.json
    .then(b => b.setupProject()) // Setup dependencies, TypeScript, ESLint, source files
    .then(b => b.finalize());    // Print next steps
}

main();

2️⃣ Adding Custom Steps

Add custom setup steps to run after default project setup:

import { ProjectBuilder } from '@mrknown404/create-express-app';

async function main() {
  const builder = new ProjectBuilder();

  builder.addStep(async () => {
    console.log("🔧 Running custom setup step...");
    // Example: create README or .env file
  });

  await builder.init()
    .then(b => b.setupProject())
    .then(b => b.runCustomSteps()) // Execute all custom steps
    .then(b => b.finalize());
}

main();

3️⃣ Using Custom Prompts

Override default interactive prompts:

import { ProjectBuilder } from '@mrknown404/create-express-app';

const customPrompts = [
  {
    type: 'list',
    name: 'language',
    message: 'Pick your preferred language:',
    choices: ['JavaScript', 'TypeScript'],
  },
  {
    type: 'checkbox',
    name: 'features',
    message: 'Select features:',
    choices: [
      { name: 'ESLint', value: 'eslint' },
      { name: 'Jest', value: 'jest' },
    ],
  },
];

async function main() {
  const builder = new ProjectBuilder(customPrompts);

  await builder.init()
    .then(b => b.collectPrompts()) // Collects values from custom prompts
    .then(b => b.setupProject())
    .then(b => b.finalize());
}

main();

4️⃣ Using Programmatic Config (No Prompts)

Skip interactive prompts entirely and provide configuration directly:

import { ProjectBuilder } from '@mrknown404/create-express-app';
import { FEATURES, LANGUAGE } from '@mrknown404/create-express-app';

async function main() {
  const builder = new ProjectBuilder({
    language: LANGUAGE.TYPESCRIPT,
    features: [FEATURES.ESLINT, FEATURES.JEST],
  });

  await builder.init()
    .then(b => b.setupProject())
    .then(b => b.finalize());
}

main();

📂 Generated Project Structure

my-express-app/
├─ src/
│  ├─ controllers/
│  ├─ middlewares/
│  ├─ routes/
│  ├─ schemas/
│  ├─ types/
│  ├─ index.ts (or index.js)
│  └─ app.ts (or app.js)
├─ package.json
├─ tsconfig.json (if TypeScript)
├─ .eslintrc.js (if ESLint)
└─ .gitignore

🛡 Error Handling & Rollbacks

  • All operations are wrapped in safe methods with automatic rollback.
  • Interruptions (SIGINT / SIGTERM) trigger cleanup.

🌟 Advanced Customization

Extend BuilderHelper for fully custom workflows:

  • addStep(fn) — Add custom setup steps.
  • runCustomSteps() — Execute all registered steps.
  • createFile(path, content) — Safely create files.
  • addDependencies(...deps) / addDevDependencies(...deps) — Manage packages programmatically.

License

MIT