Move server into its own module called from index.js