Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mongoose=require('mongoose');
- var config=require('./config/database');
- const user = config.mongoUser;
- const pass = config.mongoPass;
- const host = config.mongoHost;
- const port = config.mongoPort;
- let uri = `mongodb://${user}:${pass}@${host}:${port}`;
- if (config.mongoDatabase) {
- uri = `${uri}/${config.mongoDatabase}`;
- }
- console.log(uri);
- mongoose.connect(uri,{useMongoClient:true});
- Error: listen EADDRINUSE :::1111
- at Object._errnoException (util.js:1003:13)
- at _exceptionWithHostPort (util.js:1024:20)
- at Server.setupListenHandle [as _listen2] (net.js:1353:14)
- at listenInCluster (net.js:1394:12)
- at Server.listen (net.js:1482:7)
- at Function.listen (/coin_o_pedia/ejb/node_modules/express/lib/application.js:618:24)
- at Object.<anonymous> (/coin_o_pedia/ejb/app.js:167:16)
- at Module._compile (module.js:662:30)
- at Object.Module._extensions..js (module.js:673:10)
- at Module.load (module.js:575:32)
- at tryModuleLoad (module.js:515:12)
- at Function.Module._load (module.js:507:3)
- at Function.Module.runMain (module.js:703:10)
- at startup (bootstrap_node.js:193:16)
- at bootstrap_node.js:665:3
Add Comment
Please, Sign In to add comment