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
$ express -h Usage: express [options] [dir] Options: -h, --help output usage information --version output the version number -e, --ejs add ejs engine support --hbs add handlebars engine support --pug add pug engine support -H, --hogan add hogan.js engine support --no-view generate without view engine -v, --view <engine> add view <engine> support (ejs|hbs|hjs|jade|pug|twig|vash) (defaults to jade) -c, --css <engine> add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css) --git add .gitignore -f, --force force on non-empty directory
🌐
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 - The tool is installed as a global package using the command ‘npm install express-generator -g’, and a new Express project is created with the command ‘express myapp’. The generated Express application begins with four folders: ‘bin’ ...
🌐
npm
npmjs.com › package › express-generator
express-generator - npm
The quickest way to get started with express is to utilize the executable express(1) to generate an application as shown below: ... This generator can also be further configured with the following command line flags.
      » npm install express-generator
    
Published   May 03, 2019
Version   4.16.1
Author   TJ Holowaychuk
🌐
SAP
developers.sap.com › tutorials › basic-nodejs-application-create..html
Create a Basic Node.js Application with Express Generator | SAP Tutorials
Create a Node.js application skeleton with Express Generator and add some snippets into the backend as a basic application. ... You have installed Node.js. You have a Kyma runtime environment on SAP Business Technology Platform (BTP). If not, please follow this tutorial: Enable SAP BTP, Kyma Runtime. ... You can use the application generator tool Node.js Express generator to quickly create a Node.js application skeleton.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Extensions › Server-side › Express_Nodejs › skeleton_website
Express Tutorial Part 2: Creating a skeleton website - Learn web development | MDN
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 ...
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.

🌐
GeeksforGeeks
geeksforgeeks.org › node.js › what-is-express-generator
What is Express Generator ? - GeeksforGeeks
July 23, 2025 - It generates express Applications in one go using only one command. The generated site has a modular structure that we can modify according to our needs for our web application. The generated file structure is easy to understand. We can also configure options while creating our site like which type of view we want to use (For example, ejs, pug, and handlebars).
🌐
GitHub
github.com › expressjs › generator
GitHub - expressjs/generator: Express' application generator
The quickest way to get started with express is to utilize the executable express(1) to generate an application as shown below: ... This generator can also be further configured with the following command line flags.
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%
Find elsewhere
🌐
Medium
medium.com › swlh › build-your-first-api-with-express-generator-sequelize-and-cli-2f7494cc517b
Build Your First API With Express Generator, Sequelize and CLI | by Christiana Okere | The Startup | Medium
December 2, 2020 - ... Step 1: open your terminal using the short cut (Cntrl +Alt +T), then change the directory to your desktop using the command: ... Step 2: create a folder and give it any name of your choice.
🌐
DEV Community
dev.to › matthewpalmer9 › getting-started-with-express-generator-express-node-js-4483
Getting Started with Express-Generator (Express/Node.js) - DEV Community
December 31, 2020 - Next, you'll want generate your first Express app by typing into your terminal: express --view=ejs your-app-name · At this point, you'll want to open your project in your IDE. Alternatively, you can cd into your project.
🌐
Section
section.io › engineering-education › nodejs-app-express-generator
Creating Node.js Application Using Express Generator
June 24, 2025 - Early online stores used to feature static product grids and manual filters, but over time, retailers adopted rule-based automation. This... ... 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...
🌐
YouTube
youtube.com › watch
Getting Started With Express Framework | Express App Generator | Node.js Tutorial for Beginners #6 - YouTube
Sign up for 10,000 free minutes: https://bit.ly/3s7jDdaFind out more about ZEGOCLOUD: https://bit.ly/3TfpOHMGuides to build live streaming app: https://bit.l...
Published   November 3, 2022
🌐
4Geeks
4geeks.com › lesson › introduction-to-express-generator
Introduction to Express Generator
April 25, 2025 - To start a new project with express generator we can run the following command, which will generate a project structure:
🌐
Skillsoft
skillsoft.com › home › installation, express-generator, & api
Installation, Express-generator, & API - Express 4.13.3 - INTERMEDIATE - Skillsoft
Modify and run the default express-generator application · Configure and use the static configuration options for an express project · Describe the basics of the express application api ... After completing this video, you will be able to describe the Express framework and its relationship ...
🌐
npm
npmjs.com › package › generator-express
generator-express - npm
Run: yo express, select MVC and select your database of choice. Add --coffee if you require CoffeeScript. Ensure that the selected database is running on your machine, if running elsewhere the connection string can be changed in config/config.js ...
      » npm install generator-express
    
Published   Jun 12, 2019
Version   2.17.2
Author   petecoop
🌐
Medium
medium.com › @carmelagreco › quick-generation-of-a-new-node-js-project-using-express-express-generator-and-pug-f8e9cf6b2687
Quick generation of a Node.js project using Express, Express Generator, and Pug | by Carmela Greco | Medium
August 8, 2020 - npm install express npm install -g express-generator · You can now proceed with the automatic generation of project files. The following command specifies that the project uses the Pug Template Engine to handle the views.
🌐
FullStack
fullstack.com › labs › resources › blog › benefits-of-using-the-express-generator-typescript-module
Benefits of Using the express-generator-typescript Module
To start a new project with Express-Generator-TypeScript (assuming you already have Node.js/npm/npx installed), all you have to do is run its npx optional project name and bam! That’s it!
🌐
Medium
sadeeqcode.medium.com › how-to-set-up-express-app-and-generate-a-single-model-using-node-js-express-104fe0c60925
How to set up express App and generate a single model using Node.js(express generator) with sequelize cli(command line interface) | by Abubakar Sadiq Ismail | Medium
November 20, 2020 - next is to create a model named user with attributes (that is columns) name,email and password the :string means datatypes string(VARCHAR) which can be changed to boolean or integer in some cases npx sequelize-cli model:generate --name User --attributes firstName:string,lastName:string,email:string<hit Enter> This will: Create a model file user in models folder; Create a migration file with name like XXXXXXXXXXXXXX-create-user.js in migrations folder.
🌐
freeCodeCamp
forum.freecodecamp.org › t › using-express-generator › 415508
Using express-generator - The freeCodeCamp Forum
August 15, 2020 - I’m reading the Node-Express docs on MDN and when I’m trying to follow the “Installing the express application generator” section, I’m getting an integrity verification failure… npm ERR! code EINTEGRITY npm ERR! errno E…