Class Definition
Properties
| Property | Type | Description |
|---|---|---|
config | HttpOptions | HTTP configuration |
host | HostServerAdapter | Host adapter (Express, etc.) |
Methods
registerMiddleware(entryPath, handler)
Register middleware at a specific entry path.registerRoute(method, path, handler)
Register an HTTP route.prepare()
Prepare routes without starting the server.- Registers
/healthendpoint automatically - Prepares all configured routes
- Call before
getHandler()for serverless
getHandler()
Get the underlying HTTP handler for serverless export.start()
Start the HTTP server on the configured port.HttpOptions
Host Adapters
Default (Express)
Express is the default host adapter:Custom Host Factory
Provide a custom host adapter:Host Adapter Interface
Usage Examples
Standard Deployment
Manual Server Access
Serverless Deployment
Custom CORS
Health Endpoint
FrontMCP automatically registers a/health endpoint:
- Load balancer health checks
- Kubernetes liveness probes
- Monitoring systems
Related
FrontMcpInstance
Server bootstrap
@FrontMcp
Server configuration
Serverless Deployment
Serverless guide
Production Build
Production deployment