Nxpress LogoNxpressv1.3.8

Modern File-Based Routing for Express.js

Next-generation developer experience combining Express performance, intuitive template engines, cascading middlewares, and zero-config API routes.

Quick Installation

Scaffold a new project in seconds with your preferred package manager.

$pnpmcreate nxpress-app@latest my-app
01

Overview & CLI

Nxpress is an Express.js-based framework for Node.js providing file-based routing, template components, cascading middlewares, automatic response handling, and built-in template helpers.

Project Scaffolding (create-nxpress-app)

Scaffold a new ready-to-run Nxpress project interactively or with automated flags.

Quick Start
# Interactive wizard
pnpm create nxpress-app my-app
# or
npx create-nxpress-app my-app

# Bypass prompts with defaults (-y / --yes)
pnpm create nxpress-app my-app -y

# Scaffold API-only project without template views (--api)
pnpm create nxpress-app my-api -y --api
Option / FlagDescriptionDefault
-y, --yesSkip interactive prompts and use defaultsfalse
--apiScaffold API-only project with users and health routesfalse
-e, --engine <engine>Template engine (ejs, handlebars, nunjucks, liquid, html)ejs
-p, --port <number>HTTP server port number3000
--tailwindInclude Tailwind CSS v4 supporttrue
-m, --minimalCreate minimal project without views or componentsfalse
--app-dir <dir>Routes directory nameapp
--components-dir <dir>Components directory namecomponents
--public-dir <dir>Static public assets directory namepublic
--pkg-manager <pm>Package manager (pnpm, npm, yarn, bun, deno)pnpm

Starting the Server

You can start your Nxpress application in two ways: via the Nxpress CLI or through a custom server.ts entrypoint.

Option 1: Nxpress CLI
# Start development server with Hot Reload, route scanning, & Tailwind
nxpress dev
# or shortcut
nxp dev

# List all generated routes (inspect endpoints, methods, files & debug routing bugs)
nxpress routes

# Start production server
nxpress start

# Generate static HTML export (SSG) to out/
nxpress export
Option 2: Custom server.ts Entrypoint
# Execute server.ts directly using tsx
npx tsx --watch server.ts
# or using pnpm
pnpm serve