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

c# - Reactive Extensions ControlScheduler -

ios - How to determine if NSLayoutConstraint is horizontal or vertical? -

javascript - Enable/Disable form elements and changing the values of button at a time? -