glimpse2-runbook-test
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v44View latest version
Business logic coordination between routes and services.
Controllers should:
- Handle business logic and orchestration between services
- Handle environment variables and configuration
- Coordinate multiple service calls
- Implement business rules and validation
- Handle service business logic layer (result.success)
- Return data objects for routes to handle HTTP responses
- Example:
glimpseHandler
returns data, route callsc.json(result)
- Handle HTTP requests/responses directly (webhook handler pattern)
- Example:
handleUrlWebhook
takes Context, returns HTTP responses - Used for
/tasks/*
webhook endpoints