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

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -

javascript - parsing json not working -