[Tunji] 4 refractored the server.js file