Packages@robojs/server
DIRECTORY
API reference for @robojs/server
@robojs/server
API reference documentation for @robojs/server.
Classes
CloudflareProvider- Cloudflare Tunnel Provider implementation.RoboRequest- Extends the Web Request API with additional convenience methods.RoboResponse- Extends the Web Response API with additional convenience methods.
Interfaces
ApiEntryApiHandlerModule- API handler module with exports.ApiDefinedEndpointEndpointSchema- Endpoint schema definition for typed APIs.FindAvailablePortOptions- Options for finding an available port.FindAvailablePortResult- Result of finding an available port.ForTestingOptions- Options for creating a RoboRequest for testing purposes.ResolvedPluginRoute- Resolved plugin route configuration with normalized prefixes and asset info.RoboReplyTestClientRoute- Test client route configuration.TestClient- Test client instance for testing multiple routes.TestRequestOptions- Options for creating a test request.TestRouteOptions- Options for testing a route module.TestRouteResult- Result type for route testing that includes both Response and convenience methods.TunnelConfig- Plugin tunnel configuration.TunnelInstance- Represents a running tunnel instance.TunnelProviderConfig- Configuration for tunnel providers.TunnelProvider- Interface for tunnel providers.TypedRoboRequest- Enhanced request with typed accessors based on schema.
Type Aliases
ApiHandler- API handler function type.HttpMethodExportHttpMethodNotFoundHandlerPluginPrefixConfig- Plugin prefix configuration - supports both simple string and granular object.PluginPrefixMap- Centralized plugin prefix configuration in @robojs/server config.RouteHandlerTestableModule- Handler module that can be tested.TypedHandlerWebSocketHandler
Functions
CreateTestClient- Creates a fluent test client for testing multiple routes.CreateTestRequest- Creates a RoboRequest suitable for testing API handlers.Define- Define a typed API endpoint with optional Zod schema.FindAvailablePort- Find an available port, starting from the given port and incrementing if necessary.GetPluginRouteRegistry- Get the global plugin route registry.GetServerEngineInitPluginRoutes- Initialize the plugin route registry with prefix configuration.IsPortAvailable- Check if a specific port is available on the given hostname.Ready- Returns a promise that resolves when the plugin is all set up.TestHandler- Tests a specific handler function directly without method dispatch.TestRoute- Tests an API route module by dispatching to the appropriate handler.
Variables
Default_max_port_attempts- Default maximum number of port increment attempts.Http_methods- Supported HTTP methods for named exports.Schema_symbolServer- Use this to interact with the server.
