Commit graph

2 commits

Author SHA1 Message Date
1b78e5425a **refactor: add async error handler utility and standardize route handlers**
### Changes:
- Introduced `asyncHandler` utility to simplify error handling in asynchronous route handlers.
- Updated all route definitions in `cloud-wrapper/src/routes.ts` to use the new `asyncHandler` wrapper:
  - Standardized error management across CRUD operations for nouns, verbs, and search functionality.
  - Replaced redundant `try-catch` blocks with the `asyncHandler` wrapper to streamline code.
- Added `NextFunction` and adjusted TypeScript typings for improved clarity and error handling.

### Purpose:
Refactored route handlers to enhance maintainability, readability, and consistency by centralizing asynchronous error handling with a reusable `asyncHandler` utility. This reduces redundancy and simplifies debugging for API routes.
2025-06-19 16:03:04 -07:00
e00f1a92ce feat: add WebSocket API, REST API routes, and server setup for Brainy
Implemented a WebSocket API for real-time communication and REST API routes for CRUD operations on nouns and verbs. Added a server initialization script with WebSocket server integration and improved application structure with modularized routing and services.
2025-06-06 09:09:07 -07:00