@expressjs/create
Create Express apps with no build configuration.
npm create express@latest copy
You can also run it with your package manager of choice:
# pnpm
pnpm create express
# yarn
yarn create express
# bun
bun create express copy
Usage
Running the command with no arguments starts an interactive prompt that asks for
the project location and features. You can also pass a target directory and skip
any prompt with flags:
npm create express@latest my-app -- --ts --view ejs --linter biome --test vitest copy
Options
Flag Description [directory]Directory to create the project in. --ts, --typescriptUse TypeScript. --js, --javascriptUse JavaScript. --esm / --cjsModule system: ES modules (default) or CommonJS. --example <name>Starter example: minimal, api, web, mvc. --view <engine>View engine: none, ejs, pug, handlebars. --linter <name>Linter: none, biome, oxlint, eslint. --test <runner>Test runner: none, vitest, node, .
Any option not provided as a flag is asked interactively, unless --yes is used,
in which case the defaults are applied (TypeScript, Biome, no view engine, no test
runner, git and install enabled). This makes the command safe to run in CI:
npm create express@latest my-app -- --yes --no-install --no-git copy
Starter examples
Pick a starting point with --example (like Vite's templates). Each one is a
working, realistic scaffold rather than a bare hello-world:
minimal — a single route returning Hello, World!.
api — a JSON REST API: a routes/ router with a sample resource, a
request logger, body parsing, and a centralized 404 + error handler.
web — a server-rendered app with a view engine, static assets and error pages.
mvc — a layered structure (routes / controllers / services) ready to grow.
Examples compose with everything else, so --example api --ts --linter biome --test vitest gives you a typed, linted, tested REST API.
What you get
The generated project is composed from small fragments, so you only get what you
pick:
app.(js|ts) — the configured Express application (exported, so it is easy to test).
server.(js|ts) — boots the app and listens on process.env.PORT (default 3000).
A view engine (EJS or Pug) with a views/ folder, when selected.
A linter (Biome or ESLint) preconfigured to match the generated code.
A test runner (Vitest, the built-in node:test, or Mocha) with a test that
exercises the chosen example's own routes, when selected.
Contributing
pnpm install
pnpm lint
pnpm test copy
Templates live in templates/ as composable fragments (base, typescript,
view/*, linter/*, test/*). The scaffolding logic lives in src/actions.
License
MIT