Changing elastic endpoint for elasticsearch-js client

Don't use the client if it's not an elasticsearch server but your own application.

I don't understand what you are doing TBH.