Update index.js

Initial working to send data to ES index