refactoring the server code out of the hem.coffee and into its own file. Also making it possible to use hem functions as middleware in a connect/express server.