add socket to index.js
complete