My understanding is:

  • The express package is the framework that exposes functionalities you can use in your code
  • The express-generator package a utility that provides a command-line tool you can use to scaffold your project - ie create boilerplate folder structure, files and code.

As part of the boiler plate files is a package.json file defining the dependencies for your project - ie npm packages that you will need for your project. The express package is listed there.

Knowing the npm install instruction (run with current working directory set to project folder containing the package.json) will "install" all dependencies listed in package.json into your project folder to make them available to your application, it would be sufficient to do:

  • npm install express-generator -g
  • npm install
Answer from IAmDranged on Stack Overflow
🌐
Express.js
expressjs.com › en › starter › generator.html
Express application generator
Use the application generator tool, express-generator, to quickly create an application skeleton.
🌐
npm
npmjs.com › package › express-generator
express-generator - npm
Express' application generator. Latest version: 4.16.1, last published: 7 years ago. Start using express-generator in your project by running `npm i express-generator`. There are 34 other projects in the npm registry using express-generator.
      » npm install express-generator
    
Published   May 03, 2019
Version   4.16.1
Author   TJ Holowaychuk
🌐
SitePoint
sitepoint.com › blog › javascript › create new express.js apps in minutes with express generator
Create New Express.js Apps in Minutes with Express Generator
November 13, 2024 - express-generator is a command-line tool that saves you from writing repetitive boilerplate when starting new Express-based projects.
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › what-is-express-generator
What is Express Generator ? - GeeksforGeeks
July 23, 2025 - Express Generator is a command-line tool for quickly creating an Express.js application skeleton, providing a structured foundation with pre-configured settings, middleware, and directories, enabling rapid development of web applications.
🌐
GitHub
github.com › expressjs › generator
GitHub - expressjs/generator: Express' application generator
Express' application generator. Contribute to expressjs/generator development by creating an account on GitHub.
Starred by 1.9K users
Forked by 552 users
Languages   JavaScript 94.5% | EJS 2.4% | Pug 0.8% | Twig 0.7% | Handlebars 0.4% | HTML 0.3%
🌐
SAP
developers.sap.com › tutorials › basic-nodejs-application-create..html
Create a Basic Node.js Application with Express Generator | SAP Tutorials
You can use the application generator tool Node.js Express generator to quickly create a Node.js application skeleton.
Top answer
1 of 3
10

My understanding is:

  • The express package is the framework that exposes functionalities you can use in your code
  • The express-generator package a utility that provides a command-line tool you can use to scaffold your project - ie create boilerplate folder structure, files and code.

As part of the boiler plate files is a package.json file defining the dependencies for your project - ie npm packages that you will need for your project. The express package is listed there.

Knowing the npm install instruction (run with current working directory set to project folder containing the package.json) will "install" all dependencies listed in package.json into your project folder to make them available to your application, it would be sufficient to do:

  • npm install express-generator -g
  • npm install
2 of 3
2

This answer refers to 'express' v4 on Windows. I don't know what the behavior was with express 3 or less.

0) open a cmd prompt as administrator

1) install express-generator globally;

npm install -g express-generator

2) generate the boilerplate files in your chosen directory, for example

express myApp

3) cd to the myApp folder, where you will find the package.json (+ your main app.js file, + other folders)

4) Finally install 'express' local to your app folder (+ any other dependencies as defined in package.json)

npm install

Notes: the express you are installing in step 4) refers to the set of javascript files which form part of the express web framework, to be used and referenced by your own app; the express referred to in step 2) is actually the express-generator cmd line which you installed globally in step 1).

As for my supplementary question, npm init is used to create a package.json file where you respond to prompts, npm init -y creates the package.json automatically with default values, in either case it is not related to express at all.

If you want to build your project from scratch without boilerplate files / folders, first npm init, then npm install --save express, this installs express locally to your app, the --save option adds express as a dependency in your package.json.

Bottom line, to use the express web framework, you don't have to install express-generator, but you must install express. And if you work on, say, 3 apps which use express, the easiest thing to do is to install express 3 times locally to each app.

🌐
npm
npmjs.com › package › express-generator-typescript
express-generator-typescript - npm
Express with TypeScript's application generator.
      » npm install express-generator-typescript
    
Published   Nov 10, 2025
Version   2.7.4
Author   sean maxwell
Find elsewhere
🌐
GitHub
github.com › petecoop › generator-express
GitHub - petecoop/generator-express: An express generator for Yeoman, based on the express command line tool.
An Expressjs generator for Yeoman, based on the express command line tool.
Starred by 814 users
Forked by 131 users
Languages   JavaScript 80.6% | CoffeeScript 15.1% | Marko 1.0% | EJS 0.9% | Handlebars 0.8% | Pug 0.8%
🌐
GitHub
github.com › seanpmaxwell › express-generator-typescript
GitHub - seanpmaxwell/express-generator-typescript: Create a new express app similar to express-generator but with TypeScript
Express with TypeScript's application generator.
Starred by 937 users
Forked by 87 users
Languages   TypeScript 77.1% | JavaScript 15.8% | HTML 5.8% | CSS 1.3%
🌐
Nx
nx.dev › docs › technologies › node › express › generators
@nx/express - Generators | Nx
The @nx/express plugin provides various generators to help you create and configure express projects within your Nx workspace.
🌐
Webscale
section.io › engineering-education › nodejs-app-express-generator
Creating Node.js Application Using Express Generator
June 24, 2025 - E-commerce is evolving at an incredible rate. Online stores now operate across a multitude of cloud environments, headless architectures, and global storefronts. Each new integration and experience layer generates opportunities...
🌐
4Geeks
4geeks.com › lesson › introduction-to-express-generator
Introduction to Express Generator
April 25, 2025 - The express-generator package helps a lot in developing web applications with Node; it generates the application structure.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn › Server-side › Express_Nodejs › skeleton_website
Express Tutorial Part 2: Creating a skeleton website - Learn web ...
This article shows how you can create a "skeleton" website using the Express Application Generator tool, which you can then populate with site-specific routes, views/templates, and database calls. In this case, we'll use the tool to create the framework for our Local Library website, to which we'll later add all the other code needed by the site.
🌐
FullStack
fullstack.com › labs › resources › blog › benefits-of-using-the-express-generator-typescript-module
Benefits of Using the express-generator-typescript Module
Basically, what Express-Generator-TypeScript does is allow you to spin up a new Express.js web-server fully configured with TypeScript. The linter, logging tool, build scripts, and even a unit-testing framework are all set up for you, as well ...
🌐
GitHub
github.com › luiztools › express-generator
GitHub - luiztools/express-generator: Express' application generator
Express' application generator (LuizTools version, EJS only).
Starred by 8 users
Forked by 5 users
Languages   JavaScript 94.3% | EJS 4.9%
🌐
GitHub
github.com › Dalufishe › gen-express-app
GitHub - Dalufishe/gen-express-app: Alternative to express-generator, an easy-to-use tool for generating express applications.
gen-expressp-app is an Express application generating tool inspired by express-generator, retaining most of its excellent features and extending and improving where it falls short. We fully support ESM module and provide TypeScript templates to choose from, as well as an easy-to-use interactive interface.
Starred by 83 users
Forked by 6 users
Languages   JavaScript 81.2% | TypeScript 13.5% | HTML 1.4% | CSS 1.3% | EJS 0.9% | Handlebars 0.9% | Pug 0.8%