split server.js into index.js and server.js; all app specific logic should go in server.js and boilerplate should go in index.js; fixes #14