I have server.js and db.js The db.js file interacts with my database using Mongoose and I use server.js to call functions
server.js
db.js
Now you are done.