Client-side and Node.js Event Listener Helper