node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



Simple Collection Viewer for MongoDB. Designed for users without knowledge about internals. There is no admin access to the MongoDB instance needed. Can also export an collection as CSV file. Use SMOG or Mongo-Express if you need a (full featured) MongoDB client.



not implented yet


Exports an collection as CSV file


$ npm install express-simplemongodbview

SimpleMongoDBView needs serveral modules, see dependencies


The app needs to know which models to use. So you need an js file with the model definitions. This file has to export the models like this example (databasemodels.js):

var db = require('mongoose'), Schema = db.Schema;
var _MySchema = new Schema({
  id                : Schema.ObjectId,
  type              : { type: Number, required: true }, 
  name              : { type: String, required: false, trim: true, index: { sparse: true } },  
  timestamp         : { type: Date, default:, required: true }
var MySchema = db.model('myschema', _MySchema);
exports.MySchema = MySchema;

SimpleMongoDBView detect all schemas exported the way above.

Now, use it as standalone app:

  var mongoose = require('mongoose');
  var dbview = require('express-simplemongodbview');
  var config = {  
    modelDefinitionFile : __dirname + '/databasemodels.js',
    web: {
      host : 'localhost',
      port : 80
  mongoose.connect('mongodb://localhost:27017/mycollection', {}, function(){

Check http://localhost and http://localhost/export

Available options as object:

  • modelDefinitions: an existing object (require)
  • modelDefinitionFile: a file with the model definitons (use only modelDefinitionFile OR modelDefinitions)
  • The hostname, e.g. localhost
  • web.port: The port, e.g. 8080
  • web.cdnurl: The page uses some external js libs like jQuery, Backbone.js and Underscore.js. You can define an url to an external cdn to deliver these libs from there. Otherwise these libs are served from Express.
  • auth.enabled: can be set to true and a basic authentification (Basic HTTP Auth) jumps in
  • auth.user: the user name for authenticifation (default is admin)
  • auth.password: the user password (default is admin)

You can also use this in your existing applications, change the port accordingly.



MIT License


Copyright (c) 2013, [Hendrik Konitzer] (