Further simplified the initialization of the server

Make `index.js` more straightforward, and remove `server/middleware`, which isn't used.