standalone
Dream Mock Server - Standalone Mode
Standalone entry point for running the mock server as an application.
This module provides the main entry point for running the mock server
as a standalone application. For programmatic usage in tests, see the server
module instead.
Usage
Run the server on port 3004:
gleam run -m standalone
The server will start and listen on http://localhost:3004/
Available Endpoints
Non-streaming endpoints:
GET /get- Returns JSON with request infoPOST /post- Echoes request body as JSONPUT /put- Echoes request body as JSONDELETE /delete- Returns success responseGET /json- Returns simple JSON objectGET /text- Returns plain textGET /uuid- Returns UUID-like stringGET /status/:code- Returns response with specified status code
Streaming endpoints:
GET /- Info page with endpoint documentationGET /stream/fast- 10 chunks at 100ms intervalsGET /stream/slow- 5 chunks at 2s intervalsGET /stream/burst- 7 chunks with variable timingGET /stream/error- 3 chunks then 500 errorGET /stream/huge- 100 chunks for performance testingGET /stream/json- JSON object streamGET /stream/binary- Binary data stream