Server Application Mode
Full Express.js applications with APIs and server-side rendering.
Basic Server Configuration
import express from 'express';
export default {
type: 'server',
port: 3000,
data: {
app: {
name: 'My App',
version: '1.0.0'
}
},
middleware: [
express.json(),
express.urlencoded({ extended: true })
]
};
Server-specific topics
Server mode unlocks several additional configuration keys:
- Routes & Dynamic Pages — server-rendered pages with async
datafunctions - Factories —
defineRoutes,defineApi,defineMiddleware,defineHooksfor composable module-level definitions - API Endpoints — REST-style handlers, the
ctxcontext object, and full CRUD examples - Middleware — authentication, CORS, file uploads, and execution order