Official Visual Studio Code extension for Nxpress, the Express.js framework with file-based routing, template components, and cascading middlewares.
Features
- File & Code Generators: Quick commands to create page views, companions, API handlers, template components, directory middlewares, and configuration files.
- Dev Server Integration: Launch hot-reloading development server (
nxp dev) directly from the status bar or command palette. - Smart Snippets: Contextual code snippets for TypeScript companion files (
nxp), API routes (nxa), middlewares (nxm,nxrm), view templates (nxv), components (nxcomp), and request/environment helpers (nxr,nxe,nxg). - Hover Documentation: Detailed tooltips and documentation for Nxpress request context (
R), environment (E), global context (G), and component renderer ($). - Autocompletion: IntelliSense completion for template helpers (
len,upper,lower,truncate,ternary, etc.) and HTTP request attributes.
Extension Commands
Nxpress: Create Page View & Companion- Create new view template and TypeScript companion file.Nxpress: Create API Route Handler- Generate API route file (app/api/*.ts).Nxpress: Create Template Component- Create reusable component template (components/*.ejs).Nxpress: Create Directory Middleware- Create folder-level middleware withignorepattern array.Nxpress: Create nxpress.config.json- Generate Nxpress configuration with schema validation.Nxpress: Start Development Server- Launch development server (nxp dev).Nxpress: Start Production Server- Launch production server (nxp start).
Snippets Reference
TypeScript / JavaScript Files
nxp/nxprops: Page companion props function.nxa/nxapi: API route handlers (get,post).nxm/nxmiddleware: Directory-level cascading middleware.nxrm/nxroutemiddleware: Single route middleware.
Template Views (EJS, HTML, Nunjucks, Handlebars, Eta)
nxv/nxpage: Page view structure.nxcomp/$: Component renderer call.nxr: Request context object (R.params,R.query,R.url,R.path).nxe: Environment object (E.NODE_ENV,E.PUBLIC_*).nxg: Global context (G.siteName).nxhlen,nxhternary,nxhtrunc,nxheq,nxhjoin: Template helper functions.
License
MIT