node.js - Connecting to a database in monogolab via mongojs -


I have a node server and so far my database was local, but now I need to keep it on mongolab.

Can you tell me how to connect to the database, please?

  1. Use go to db = mongojs ('mongodb)

  2. : // USERNAME: PASSWORD @ ds043497 .mongolab.com: 43497 / heroku_app14986764 ', [' collectionname ']);

And you will connect. I did not test it.


Comments

Popular posts from this blog

python - rpy2 import is not working -

javascript - How to get MySQL query result returned using $.ajax -

javascript - How to use the code plugin with popcornjs -