Moved server initialization code into the index.js.