How gustavodesousalima/chatwebsocket works
Project type and purpose
• This is a lightweight full-stack web application whose sole purpose is to demonstrate and test real-time chat using the WebSocket protocol (via Socket.IO).
• The backend is a Node.js server (Express + Socket.IO) that serves static assets and brokering real-time messages. The frontend is a static HTML/CSS/JS client.
File structure
• Top-level:
• backend/
– index.js (entry point)
– package.json / package-lock.json (dependency manifest)
• frontend/
– index.html, acess.html, script.js, styles.css, assets/
• No database directory: chat state is maintained in memory.
• No microservices—single Node.js process.
• Deployment config (not in repo) uses AWS EC2 + Nginx + Certbot + PM2 (mentioned in README).
README for additional insights
• Confirms Express serves static files and Socket.IO handles WebSocket connections with fallback.
• Deployment stack on EC2:
• Nginx→reverse proxy & SSL (Certbot)
• PM2→ensures Node.js process stays up
• Node.js 18+ runtime