add javascript, update version, and fix middleware
allow customization of endpoint url