Modularized server.cpp

Created initServer() function and getFile() function