DEV Community

Discussion on: Build a Todo App with Node.Js, ExpressJs, MongoDB and VueJs – Part 1

Collapse
 
abiodunjames profile image
Samuel James • Edited

Hi Christopher,
From the debug information, I could see that Config.js could not be imported. Please note that file names are case sensitive on Unix machines. Could you please double check Config.js is in the right case? I look forward to hearing from you :)

Collapse
 
ctuxboy profile image
Christophe Hollebeke

Hi Samuel,
Thanks a lot for your helpful answer. Yes that was the problem. Shame on me :-/

Ok, after that start the server: '$node server.js' but shows an error:

(node:2977) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

After searching the net, found a solution. I'm adding this line to server.js:
const dbconfig = { useNewUrlParser: true, };

And add the variable in this line:
mongoose.connect(config.DB, dbconfig)

Now it works :-)

I'm a webdesigner buildign WP websites, but i want to learn NodeJS. Having basic JS knowledge, so i'm an absolute NodeJS beginner.
Trying learning a lot with this useful and awesome examples.
And... sorry for my poor english.