Updated the server.js to use mongoose