Changes to the sample.html, open connection and close connection on server.js