I Wanted to deploy an web application on Heroku which has to be served using staticfilesfolder in WebSocketServer.ja
port(getHerokuAssignedPort());
webSocketIdleTimeoutMillis(1000000000);
staticFileLocation("/public");
webSocket("/em/", WebSocketHandler.class);
init();
and websocketClient.js
var webSocket = new WebSocket("ws://" + location.hostname + ":" + location.port + "/em/");
But I was unable to server the *.html, *.css, *.js file from /public folder.It is working fine with my local system not working on heroku site.It shows application error.