Refactor out server init to index.js