index.js realtime