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

create-express-boiler

v1.0.0

Published

A CLI tool to generate production-ready Express.js backends

Downloads

3

Readme

Create Express Boiler

A powerful CLI tool to generate production-ready Express.js backend boilerplates with customizable options for JavaScript or TypeScript, authentication, database integration, and more.

NPM Version License GitHub Issues

Overview

create-express-boiler is a command-line tool designed to scaffold professional, production-ready Express.js backend projects. With a simple command (npx express-pro --name <project-name>), it prompts you to configure your project with options for:

  • Language: JavaScript or TypeScript
  • API Type: Authentication (with JWT-based login/register) or public APIs
  • Database: None, MongoDB, PostgreSQL, or MySQL
  • Package Manager: npm, yarn, or pnpm
  • Development Tool: nodemon (JavaScript) or ts-node-dev (TypeScript)
  • Port Number: Customizable (default: 3000)
  • Dependency Installation: Install dependencies automatically or skip

The generated project includes a modular structure, security middleware, error handling, logging, and example APIs, making it ready for production or development.

Installation

To use create-express-boiler, you need Node.js (LTS version recommended, e.g., 18.x or 20.x) installed. Run the following command to generate a new project:

npx express-pro --name <project-name>

This will start the interactive CLI, prompting you to configure your project.

Usage

  1. Run the CLI:

    npx express-pro --name my-app

    Follow the prompts to select your preferences:

    ? Select language: (JavaScript/TypeScript)
    ? API type: (Authentication/Public API)
    ? Database type: (None/MongoDB/PostgreSQL/MySQL)
    ? Package manager: (npm/yarn/pnpm)
    ? Development tool: (nodemon/ts-node-dev)
    ? Port number: (default: 3000)
    ? Install dependencies now? (Yes/No)
  2. Navigate to the Project:

    cd my-app
  3. Set Up Environment:

    • Copy .env.example to .env and update values (e.g., PORT, DB_URI, JWT_SECRET if applicable).
    cp .env.example .env
  4. Run the Project:

    • Development mode:
      npm run dev
    • Production mode:
      npm run start
  5. Test APIs: Use tools like Postman or curl to test the generated APIs:

    • GET /api/examples: Fetch example resources
    • POST /api/examples: Create an example resource
    • If authentication is enabled:
      • POST /api/auth/register: Register a user
      • POST /api/auth/login: Login and get a JWT
      • GET /api/auth/protected: Access a protected route (requires JWT)

Features

  • Customizable Boilerplate: Choose between JavaScript or TypeScript, with or without authentication, and optional database integration.
  • Production-Ready:
    • Security: Includes helmet, cors, and express-rate-limit.
    • Error Handling: Global error-handling middleware.
    • Logging: Configured with winston or morgan.
    • Environment Variables: Managed with dotenv.
  • Authentication: Optional JWT-based authentication with login/register APIs and protected routes.
  • Database Support:
    • MongoDB: Uses mongoose with sample schemas.
    • PostgreSQL/MySQL: Uses sequelize with sample models.
  • Modular Structure: Organized with MVC pattern (src/controllers, src/routes, src/models, etc.).
  • Developer Tools:
    • Linting and formatting with eslint and prettier.
    • Hot-reloading with nodemon (JavaScript) or ts-node-dev (TypeScript).
  • Git-Ready: Initializes a Git repository with a .gitignore file.
  • Comprehensive Documentation: Generated README.md with setup instructions and API details.

Generated Project Structure

my-app/
├── src/
│   ├── controllers/
│   │   └── exampleController.js (or .ts)
│   ├── routes/
│   │   └── exampleRoutes.js (or .ts)
│   ├── middleware/ (if authentication)
│   │   └── auth.js (or .ts)
│   ├── config/ (if database)
│   │   └── db.js (or .ts)
│   ├── utils/
│   │   └── logger.js (or .ts)
│   └── app.js (or app.ts)
├── .env
├── .env.example
├── .gitignore
├── package.json
├── README.md
├── nodemon.json
└── tsconfig.json (TypeScript only)

Example APIs

  • Public APIs:

    • GET /api/examples: Returns a list of example resources.
    • POST /api/examples: Creates a new example resource.
  • Authentication APIs (if enabled):

    • POST /api/auth/register: Register a user (e.g., { "username": "user", "password": "pass" }).
    • POST /api/auth/login: Login and receive a JWT.
    • GET /api/auth/protected: Access a protected route (include JWT in Authorization: Bearer <token>).

Prerequisites

  • Node.js (LTS version, e.g., 18.x or 20.x)
  • npm, yarn, or pnpm (based on your choice)
  • MongoDB, PostgreSQL, or MySQL (if database integration is selected)

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository: https://github.com/fshrabon151/create-express-app
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m "Add your feature"
  4. Push to the branch: git push origin feature/your-feature
  5. Open a pull request.

Issues

Found a bug or have a feature request? Open an issue at https://github.com/fshrabon151/create-express-app/issues.

License

This project is licensed under the MIT License.

Author

Created by F Shrabon.