Skip to main content

Framework - Express.js

Mark an Express.js source layer explicitly while composing its compiler behavior from the source role and Node runtime.

Why Use This Preset?

  1. Makes the Express.js framework choice visible in a standard Nova preset chain.
  2. Avoids copying Express-specific compiler settings that the framework does not require.
  3. Lets role-source own declarations and emit while runtime-node owns module resolution and libraries.
  4. Leaves application-specific Express and Node types in the local TSConfig.

Usage

Add the preset after the essentials, strict, source-role, and Node-runtime layers.

tsconfig.json
json
{
  "extends": [
    "@cbnventures/nova/presets/tsconfig/dx-essentials.json",
    "@cbnventures/nova/presets/tsconfig/dx-strict.json",
    "@cbnventures/nova/presets/tsconfig/role-source.json",
    "@cbnventures/nova/presets/tsconfig/runtime-node.json",
    "@cbnventures/nova/presets/tsconfig/fw-expressjs.json"
  ],
  "compilerOptions": {
    "outDir": "./build",
    "rootDir": "./src",
    "types": [
      "@types/node",
      "@types/express"
    ]
  },
  "include": [
    "./src/**/*"
  ],
  "exclude": [
    "./build/**",
    "./node_modules/**"
  ]
}

What This Preset Configures

Express.js does not require compiler overrides beyond the Node runtime, so this preset intentionally supplies an empty compilerOptions object. It remains useful as an explicit, future-compatible framework layer.

The preceding runtime-node layer supplies lib, module, and moduleResolution. The preceding role-source layer supplies declaration and emit behavior.