github.com/plazicx/NODE_HEROKU ↗
testing node server heroku cloud deployment
Open this visualization on its own page →
Contributors
1
Lines of Code
25
From
2020-12-06
To
2020-12-11
About plazicx/NODE_HEROKU
NODE_HEROKU is a demonstration project showing how to deploy a Node.js server to Heroku cloud infrastructure with real-time communication capabilities. The project implements a client-server architecture using Socket.IO for WebSocket communication and Peer.js for peer-to-peer connections between clients and a server instance.
The application consists of two main endpoints: a server view at /server that initializes the primary peer connection and registers itself with a unique identifier, and a client view at /client that connects to the server, retrieves the server's peer ID through Socket.IO, and establishes a peer-to-peer connection for direct messaging. The flow demonstrates basic real-time communication where clients can send and receive messages through the established peer connection while maintaining a reliable server connection via Socket.IO.
The project is designed as a foundation for multiplayer cloud-based games where low-latency client input and reliable server communication are essential. It supports running locally for testing with npm and deploying to Heroku for production use. The implementation includes a QR code concept where clients can connect to specific server instances by passing a server ID as a query parameter, enabling multiple concurrent servers to coexist and allowing clients to target specific instances.