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 :)
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 checkConfig.js
is in the right case? I look forward to hearing from you :)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.