moved model and routes out of server.js