Guest User

Untitled

a guest
Feb 24th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. var mongoose=require('mongoose');
  2. var config=require('./config/database');
  3.  
  4. const user = config.mongoUser;
  5. const pass = config.mongoPass;
  6. const host = config.mongoHost;
  7. const port = config.mongoPort;
  8.  
  9. let uri = `mongodb://${user}:${pass}@${host}:${port}`;
  10. if (config.mongoDatabase) {
  11. uri = `${uri}/${config.mongoDatabase}`;
  12. }
  13. console.log(uri);
  14.  
  15. mongoose.connect(uri,{useMongoClient:true});
  16.  
  17. Error: listen EADDRINUSE :::1111
  18. at Object._errnoException (util.js:1003:13)
  19. at _exceptionWithHostPort (util.js:1024:20)
  20. at Server.setupListenHandle [as _listen2] (net.js:1353:14)
  21. at listenInCluster (net.js:1394:12)
  22. at Server.listen (net.js:1482:7)
  23. at Function.listen (/coin_o_pedia/ejb/node_modules/express/lib/application.js:618:24)
  24. at Object.<anonymous> (/coin_o_pedia/ejb/app.js:167:16)
  25. at Module._compile (module.js:662:30)
  26. at Object.Module._extensions..js (module.js:673:10)
  27. at Module.load (module.js:575:32)
  28. at tryModuleLoad (module.js:515:12)
  29. at Function.Module._load (module.js:507:3)
  30. at Function.Module.runMain (module.js:703:10)
  31. at startup (bootstrap_node.js:193:16)
  32. at bootstrap_node.js:665:3
Add Comment
Please, Sign In to add comment