Added more functionality to server.js