Websocket endpoint#191
Open
gloskull wants to merge 2 commits into
Open
Conversation
…updates
- Installed `ws` and `express` packages.
- Created a standalone `server.js` in the repository root to host the mock WebSocket server as requested.
- Implemented `on('connection')` listener and a 5-second interval "ping" broadcast.
- Removed BOM from `prisma/schema.prisma` to resolve Prisma validation issues.
- Fixed module imports in `src/dynamic/dynamic.module.ts`.
- Adjusted `src/pools/pools.controller.int.spec.ts` to match the actual API implementation.
Co-authored-by: gloskull <189399494+gloskull@users.noreply.github.com>
…12771341629389218532 Scaffold mock WebSocket endpoint for price updates
Author
|
Done with this issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: feat: Scaffold mock WebSocket server for frontend integration
Description
This PR introduces a mock WebSocket server to provide the frontend team with an active WebSocket endpoint for early development and integration. By scaffolding the server before the real-time backend implementation is complete, frontend developers can immediately begin connecting client sockets, testing connection lifecycles, and validating real-time communication workflows without being blocked by pending backend features.
In addition to the WebSocket scaffold, this PR resolves several project environment issues that were affecting development and testing. These include fixing Prisma BOM-related problems, correcting module import inconsistencies, and repairing a failing integration test to restore a clean and stable development environment.
Changes Made
✅ New Features
server.js.✅ Environment & Maintenance
✅ Files Modified
server.js: Added the mock WebSocket server and periodic ping broadcast functionality.WebSocket Behavior
Broadcast Message
Every five seconds, the server broadcasts the following payload to all connected clients:
{ "type": "ping", "timestamp": "2024-01-15T10:30:00.000Z" }This heartbeat allows frontend applications to:
Testing
WebSocket Testing
Environment Verification
Benefits
Security & Validation
Testing Instructions
Checklist
Issue Resolution
Closes #60 Scaffold mock WebSocket server for frontend integration
This implementation provides a temporary yet functional WebSocket endpoint that allows frontend developers to begin integrating and testing real-time features immediately. Alongside the mock server, several environment and testing issues have been resolved, resulting in a cleaner, more stable, and development-ready codebase while the production WebSocket implementation is being developed.