Modularize JS

I wanted to revisit this project and modularize it. It's a pretty small little app, but there's a pretty clear differentiation about what is handled through the http server and what's handled through web socket publishing.

Based on that distinction, I created a new `publisher.js` module which is exported as a module that includes all necessary actions needed for web socket publishing.

I also cleaned up the directory structure a tad.