nodeboot-server-express

Use when the user wants to run a Node-Boot app on Express or Express.js, needs ExpressServer or ExpressDriver specifically, wants the broadest middleware ecosystem, or needs compatibility with Express middleware, multer uploads, cookies, CORS, and express-session in a long-lived HTTP server.

nodejs-boot/node-boot1 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI

Agent Skills format with YAML frontmatter. Claude Code reads it as-is.

---
name: "nodeboot-server-express"
description: "Use when the user wants to run a Node-Boot app on Express or Express.js, needs ExpressServer or ExpressDriver specifically, wants the broadest middleware ecosystem, or needs compatibility with Express middleware, multer uploads, cookies, CORS, and express-session in a long-lived HTTP server."
license: "MIT"
---

# Node-Boot on Express

Use this when Express is the safest default: the sample app keeps the normal Node-Boot model and simply boots with `ExpressServer`.

## Fresh start or existing app?

Read [`../_shared/fresh-vs-existing.md`](../_shared/fresh-vs-existing.md) first, then apply it here:

-   **Fresh start:** `npx degit nodejs-boot/node-boot/samples/sample-express my-app`.
-   **Existing app:** look for `NodeBoot.run(` in `src/app.ts` and for `@nodeboot/express-server` in `package.json` to confirm this adapter is (or isn't) already wired.

## Minimal setup

From [`samples/sample-express/src/app.ts`](https://github.com/nodejs-boot/node-boot/blob/main/samples/sample-express/src/app.ts):

```ts
@EnableDI(Container)
@EnableComponentScan()
@NodeBootApplication()
export class FactsServiceApp implements NodeBootApp {
    start(): Promise<NodeBootAppView> {
        return NodeBoot.run(ExpressServer);
    }
}
```

The real sample adds OpenAPI, authorization, persistence, schedulers, HTTP clients, validation, and actuator on top of that same `NodeBoot.run(ExpressServer)` line.

## Express-specific notes

-   `ExpressServer` is the class passed to `NodeBoot.run(...)`; `ExpressDriver` is the request/route adapter underneath.
-   The adapter installs JSON/urlencoded parsing and supports text, buffers, streams, redirects, and rendered templates.
-   Express-only middleware belongs in a `@Configuration()` bean that uses the injected Express `application` (`helmet`, `hpp`, static assets, view engine setup, etc.).
-   Optional `cors`, `session`, `multipart`, and `cookie` behavior comes from a `SERVER_CONFIGURATIONS` bean returning `ExpressServerConfigs`.
-   Authorization resolvers and Node-Boot middleware should be typed against Express `Request`/`Response`.

See the full adapter docs in [`servers/express-server/README.md`](https://github.com/nodejs-boot/node-boot/blob/main/servers/express-server/README.md) and the runnable reference app in [`samples/sample-express/README.md`](https://github.com/nodejs-boot/node-boot/blob/main/samples/sample-express/README.md).

## Validate

Run `cd samples/sample-express && pnpm dev`, then hit `GET http://localhost:3000/api/v1/hello/`.

More General & Other skills

← All General & Other skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY