Mondongo
A simple module for describe databases and collections of mongodb.
Feactures:
- Describe databases
- Connect to database
- Get collections list
This is on GitHub
Installation
$ [sudo] npm install mondongo --save
Usage
var mondongo = ; // Connection URLvar url = 'mongodb://localhost:27017/blog_db'; mondongo;
Example output (json)
"collection": "entrada" // collection name "keys": "_id" "titulo" "cuerpo" "fondo" "resumen" "oculto" "eliminado" "categoria_entrada_ref" "entrada_usuario" "createdAt" "updatedAt" "count": 11 // number of keys "describe": "key": "_id" "type": "object" // type: object, string, number, boolean... "isID": true // is an identifier? ==> true | false "key": "titulo" "type": "string" "key": "cuerpo" "type": "string" "key": "fondo" "type": "string" "key": "resumen" "type": "string" "key": "oculto" "type": "boolean" "key": "eliminado" "type": "boolean" "key": "categoria_entrada_ref" "type": "object" "isID": true "key": "entrada_usuario" "type": "object" "isID": true "key": "createdAt" "type": "date" "key": "updatedAt" "type": "date" ... //others collections