Guest User

Untitled

a guest
Jul 28th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. MongoDB Node.js isn't only get null in response to getting data
  2. (function() {
  3. var client, db, listAllData, server;
  4.  
  5. db = require('mongodb').Db;
  6. server = require('mongodb').Server;
  7.  
  8. client = new db('images', new server('something.mongolab.com', 111111, {
  9. username: 'username',
  10. password: 'password'
  11. }));
  12.  
  13. client.open(function(err, the_client) {
  14. the_client.collectionNames(function(err, colls) {
  15. console.log(colls);
  16. });
  17. });
  18.  
  19. }).call(this);
Add Comment
Please, Sign In to add comment