#CRM using npm, mongoose
9 messages · Page 1 of 1 (latest)
Hi just a quick one before anwser have you npm installed all dependencies ? 🙂
ie a file for your MongoDB connection string and then installing all the dependencies
What kind of error do you have?
Hi thanks for engaging, I got it figured out during support time with my TA. I'm on the next lesson now, snagged on a weather API
Just FYI, technically your current code has a bug. The mongoose.connect(process.env.MONGODB_URI, ); call is asynchronous, so you should be awaiting it. i.e. If for some reason it takes a long while to establish a DB connection, the subsequent call to userInput() could allow DB calls to be made before the DB is connected. Does this make sense?
Sounds good.
Let's connect