changed back to http server for use with heroku and sslendpoint
refactor of server.js file. Can run local https server during development. On Heroku, run a http server with ssl endpoint enabled for secure communications.