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
Security > Network Acess> Add IP Adress > Add Current Computer IP address. Solved my problem.