Giter VIP home page Giter VIP logo

adminmongo's Introduction

adminMongo

npm downloads badge npm version badge Build Status Github stars

adminMongo is a cross platform user interface (GUI) to handle all your MongoDB connections/databases needs. adminMongo is fully responsive and should work on a range of devices.

adminMongo connection information (including username/password) is stored unencrypted in a config file, it is not recommended to run this application on a production or public facing server without proper security considerations.

Support

If my work helps you, please consider buying me a coffee

Installation

  1. Navigate to folder & install adminMongo: git clone https://github.com/mrvautin/adminMongo.git && cd adminMongo
  2. Install dependencies: npm install
  3. Start application: npm start or node app
  4. Visit http://127.0.0.1:1234 in your browser

Note: Node.js version 4.x or above is required

Electron App

adminMongo can also be used as a cross platform Electron application. Due to the size of Electron it will need to be built manually.

To build for Mac:

$ npm run-script packageOsx

To build for Windows:

$ npm run-script packageWin32

To build for Linux:

$ npm run-script packageLinux

Once built, the executable will be in the /releases folder.

Prebuilt binaries

Prebuilt binaries can be downloaded here:

Mac 64bit

Windows 32bit

Windows 64bit

The Electron builds have been tested on Mac and Windows 10. Linux has not been tested. Please report any issues.

Deploy on Heroku

Deploy

Demo (read only)

A read only demo can be seen here

Features

  • Manage from a connection level for easy access to multiple databases
  • Create/Delete databases
  • Backup/Restore databases
  • Create/Delete/Edit collection
  • Create/Delete/Edit documents
  • Create/Delete indexes
  • Query documents
  • Collection statistics
  • Export collections in JSON format
  • Server monitoring

Current limitations

  • Documents need to have an "_id" value which is a string, integer, or MongoDB ObjectId. Documents using Composite ID indexing is currently not supported.
  • Connection strings with multiple hosts for replica sets are currently not supported.

Configuration

adminMongo will listen on host: localhost and port: 1234 by default. This can be overwritten by adding a config file in /config/app.json. For example:

{
    "app": {
        "host": "10.0.0.1",
        "port": 4321,
        "password": "secureadminpassword",
        "locale": "de",
        "context": "dbApp",
        "monitoring": false
    }
}

Note: Any changes to the config file requires a restart of the application

All above parameters are usable through the environment which makes it very handy to when using adminMongo as a docker container! just run docker run -e HOST=yourchoice -e PORT=1234 ...

The config file (optional) options are:

Option Env-variable Definition
host HOST The IP address adminMongo will listen on
port PORT The Port adminMongo will listen on
password PASSWORD An application level password to add simply authentication
locale LOCALE The locale is automatically set to the detected locale of Nodejs. If there is not a translation, adminMongo will default to English. This setting overrides the default/detected value
context CONTEXT Setting a context of "dbApp" is like changing the base URL of the app and will mean the app will listen on http://10.0.0.1:4321/dbApp. Ommiting a context will mean the application will listen on root. Eg: http://10.0.0.1:4321. This setting can be useful when running adminMongo behind Nginx etc.
monitoring MONITORING Whether to run monitoring at regular intervals. Defaults to true or on

Setting a context path

Setting a context of "dbApp" is like changing the base URL of the app and will mean the app will listen on http://10.0.0.1:4321/dbApp. Ommiting a context will mean the application will listen on root. Eg: http://10.0.0.1:4321. This setting can be useful when running adminMongo behind Nginx etc.

An example Nginx server block. Note the location /dbApp { and proxy_pass http://10.0.0.1:4321/dbApp; lines match the context set in the /config/app.json file.

server {
    listen 80;

    server_name mydomain.com www.mydomain.com;

    location /dbApp {
        proxy_pass http://10.0.0.1:4321/dbApp;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Language locale

Looking for people to translate into other languages. If you can help, grab the /locale/en.js file, translate to your language and submit a pull request.

The locale is automatically set to the detected locale of Nodejs. If there is not a translation, adminMongo will default to English. To override the detected locale a setting can be added to the app.json file. See Configuration section for a "German" example.

Authentication

By default adminMongo is not password protected. You can add password authentication by adding a password value to the /config/app.json file (See the Configuration section). Once added you will need to restart adminMongo and all routes will be protected until the correct password is added. You will then be authenticated for the life of the session (60 mins by default) or if the "Logout" link is clicked.

Usage

Create a connection

After visiting http://127.0.0.1:1234 you will be presented with a connection screen. You need to give your connection a unique name as a reference when using adminMongo and a MongoDB formatted connection string. The format of a MongoDB connection string can form: mongodb://<user>:<password>@127.0.0.1:<port>/<db> where specifying to the <db> level is optional. For more information on MongoDB connection strings, see the official MongoDB documentation.

You can supply a connection options object (see docs) with each connection.

For example:

{
    "poolSize": 10,
    "autoReconnect": false,
    "ssl": false
}

Note: The connection can be either local or remote hosted on VPS or MongoDB service such as mLab.

The connection can also be automatically initiated through the environment (or with the docker -e parameters)

Env-variable Description
CONN_NAME The name of the connection to create on boot
DB_USERNAME The username for the database connection
DB_PASSWORD The password for the database user
DB_HOST The host IP address or DNS name without the port!
DB_PORT The port of the mongoDB database, if not provided the default 27017 will be used
DB_NAME The name of the database

The Connection setup screen adminMongo connections screen

Connection/Database admin

After opening your newly created connection, you are able to see all database objects associated with your connection. Here you can create/delete collections, create/delete users and see various stats for your database.

The connections/database screen adminMongo database screen

Collections

After selecting your collection from the "Database Objects" menu, you will be presented with the collections screen. Here you can see documents in pagination form, create new documents, search documents, delete, edit documents and view/add indexes to your collection.

The collections screen adminMongo collections screen

Searching/Querying documents

You can perform searches of documents using the Search documents button on the collections screen. You will need to enter the key (field name) and value. Eg: key = "_id" and value = "569ff81e0077663d78a114ce" (Only works on string "_id" fields - Use "Query Documents" for ObjectID's).

You can clear your search by clicking the Reset button on the collections screen.

Simple search documents adminMongo search documents

Complex querying of documents is done through the "Query documents" button. This allows a query Object to be passed to MongoDB to return results. Queries can be written in full BSON format or EJSON format. For example these queries should return the same results:

{
    ObjectId("56a97ed3f718fe9a4f599489")
}

is equivalent to:

{
    "$oid": "56a97ed3f718fe9a4f599489"
}

Query documents adminMongo search documents

Documents

Adding and editing documents is done using a JSON syntax highlighting control.

Editing a document adminMongo documents

Documents with Media embedded show previews

Documents with media adminMongo media

Server Monitoring

Functionality currently in Beta

Selected server monitoring is done at regular intervals and stored in local database store for 24hrs.

New connections require an app restart for monitoring to commence

Server monitoring adminMongo server monitoring

Indexes

Indexes can be added from the collection screen. Please see the official MongoDB documentation on adding indexes.

Viewing/Adding indexes adminMongo documents

Tests

The adminMongo API tests include:

  • Add and remove a connection
  • Add and remove a database
  • Add, remove and rename a collection
  • Create and delete a user
  • Add, query and delete a document

To run tests, simply run:

npm test

Note: You will need to ensure there is no password protection setup in the /config/app.json.

You may need to edit the variables and connection string in /tests/tests.js for your MongoDB instance.

If you see any missing tests, please submit a PR.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Future plans

Please make any suggestions.

License

The MIT License

adminmongo's People

Contributors

ajaysharavat avatar aymen-mouelhi avatar burn2delete avatar codymorrison avatar destromas1 avatar diegovillacis10 avatar duksis avatar emailbob avatar fadomire avatar hacor avatar hunsu avatar ianfinch avatar johnrichardrinehart avatar lefdilia avatar maitreyabuddha avatar matze1234 avatar mikesir87 avatar mrvautin avatar rastopyr avatar rroossssoo avatar salarnasiri avatar sapph1re avatar snyk-support avatar stefanocudini avatar vitaljok avatar wuliupo avatar wyattjia avatar ziedmahdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adminmongo's Issues

Incorrect JSON valiue escaping

  1. Create a document like this:
    {
        "_id": "ObjectId(\"1\")",
        "name": "Test"
    }
  1. Try to open or delete the document.

=> Error, the value escaping does not work correctly.

Standard user not documented

I tried to setup adminMongo as per instructions. When I opened the URL, I was asked for a user and password, which was not documented anywhere (obvious). From the source code, I could read that it was user: test, password: password. You might want to document that somewhere. If you want, I can make a PR to add it to the Readme.MD

Setup with nginx (root path)

Cool stuff, thanks !
But when I try to setup with nginx like this:

location /adminmongo
    {   proxy_pass http://mongoadmin:1234;}

all links try to get from via root dir '/' not from '/adminmongo'.
How can I fix it ?

Installation failing in Ubuntu 12.02

npm install
npm http GET https://registry.npmjs.org/ace-builds
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/bootstrap
npm http GET https://registry.npmjs.org/config
npm http GET https://registry.npmjs.org/cookie-parser
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express-handlebars
npm http GET https://registry.npmjs.org/font-awesome
npm http GET https://registry.npmjs.org/hbs
npm http GET https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/mongo-uri
npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/mongodb-extended-json
npm http GET https://registry.npmjs.org/mongojs
npm http GET https://registry.npmjs.org/morgan
npm http GET https://registry.npmjs.org/nconf
npm http GET https://registry.npmjs.org/serve-favicon

npm ERR! Error: failed to fetch from registry: bootstrap
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! http://bugs.debian.org/npm
npm ERR! or use
npm ERR! reportbug --attach /root/adminMongo/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-93-virtual
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /root/adminMongo
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: bootstrap
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/adminMongo/npm-debug.log
npm not ok

app crash: Cannot read property 'users' of undefined

First of all, thanks for creating this application. It's exactly what I was looking for. However I run into an error. When connecting to my local dev database, everything is OK. However when I try to connect to an external database, which is created on my VPS using dokku, the app crashes with the following error:

/adminMongo/node_modules/mongodb/lib/utils.js:98
    process.nextTick(function() { throw err; });
                                  ^

TypeError: Cannot read property 'users' of undefined
    at /adminMongo/routes/index.js:56:55
    at get_db_list (/adminMongo/routes/index.js:864:9)
    at /adminMongo/routes/index.js:51:25
    at /adminMongo/routes/index.js:902:13
    at /adminMongo/node_modules/mongojs/lib/database.js:121:5
    at /adminMongo/node_modules/mongojs/lib/database.js:113:7
    at handleCallback (/adminMongo/node_modules/mongodb/lib/utils.js:96:12)
    at /adminMongo/node_modules/mongodb/lib/cursor.js:851:16
    at handleCallback (/adminMongo/node_modules/mongodb-core/lib/cursor.js:244:5)
    at setCursorDeadAndNotified (/adminMongo/node_modules/mongodb-core/lib/cursor.js:553:3)

when I use the following connection string in terminal using mongo shell, I do get a connection:

mongo <IP>:<PORT>/<DB> -u <USER> -p <PASS>

I'm using the following connection string in adminMongo

mongodb://<USER>:<PASS>@<IP>:<PORT>/<DB>

The database version I'm connecting to is 3.0.6

Any ideas what might go wrong? Thanks in advance

ENOENT, open '/views/layouts/layout.hbs' with Forever

I got this error (not critical).

Error: ENOENT, open '/views/layouts/layout.hbs'

This error appears when I start nodejs with forever like this
forever start /var/www/adminMongo/app.js

But not with
forever start app.js

How to fix it ? Because it's very useful to manage my nodejs apps when I see all the paths with forever list
thanks

Some collections are not shown/populated.

I have the following collections (data grabbed using mongo shell)

show collections
dashboards
datas
datasources
main
roles
users
widgets

now on the UI I cannot see 'datas' and 'users' always return empty.

If I force the url (datas/view?page=1) to navigate to my collection it returns the correct data. But that is not the case with users. Users is always empty.

to sum up. 1 collection is not shown on the list but if navigated to it lists everything. Users collection is shown but no documents

Global install doesn't move config

When performing an npm i -g, npm doesn't install the "config" folder in the node modules, this causes an error when adding connections ("file not found error") then you have to move the config folder manually.

Completely flattens the output

I just gave adminMongo a try for the first time.

Unfortunately, it completely flattened the document I was editing, beyond recognisability

The following is an excerpt from the document, the way it looked before editing it inside adminMongo.

{
"description": {
    "cdata": "This is a proper description"
}

After pressing "Save document", adminMongo turned it into the following garbled mess.

{
"description[cdata]": "This is not a proper description",
}

The same is true for the whole document. Everything that wasn't a basic field (arrays, embedded documents, et al) got flattened into one.

Is there a way to add a basic-auth login screen?

I'm hosting adminMongo on a server and I'm looking to add some kind of password protection to it (as currently anybody with the URL can actually access the UI). Is there anything we can do to add a basic auth?

I went through the readme but didn't see anything about admin-login credentials for the UI. (Or I must have overlooked it).

Storing an object with MongoDB ObjectId() converts to String

I spent quite a some time on this one...

If you create an object in MongoDB, the "_id" is of ObjectId type. Of you open and save the document in MongoAdmin, however, the value is converted to String and cannot be used for comparison elsewhere.

Failed to start

When I start the web server using the command:

npm start

I got a list of errors:

npm ERR! [email protected] start: node app.js
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the admin-mongo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls admin-mongo
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.2.0-25-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /opt/adminMongo
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/adminMongo/npm-debug.log
npm ERR! not ok code 0
Currently, my environment is Ubuntu 15.10. Anyone can help me fix that?

Dealing with large documents

Hi!

First of all thanks, I have only just started looking at adminMongo but so far it looks great.

I have a database which has some collections that contain large documents (around 10Mb each) and this means that when you click on the collection it basically freezes.

I was wondering if there was any way to get around this?

I noticed that someone already asked about async loading of large documents (issue #18) but your reply was that this was out of scope, but it really would be a great feature.

Any ideas for workarounds in the meantime? E.g. set pagination to 1 for certain collections?

Best regards,

Eric

Production Use?

Hello,

First of all thanks a lot for this tool, it is great!
I have read the readme where it is stated:
"adminMongo connection information (including username/password) is stored unencrypted in a config file, it is not recommended to run this application on a production or public facing server without proper security considerations."

I was wondering if there is any plan on adding some sort of encryption; and/or authentication for someone who visits the UI.

Thanks!

Authentication Failed for Mongo DB 3.0

Hi,

When I am trying to connect to remote mongodb instance, I am getting Authorization Failed even through I entered correct credentials. Looks like this is because of ScramSHA1 auth Mechanism in Mongo 3.04. Does this app support it.

Couldn't I access the host from remote?

I recognized that I can't access the host from other machine after I install the project on my centos7. But as you known, The host of linux usually only work in text mode, so I will be very appreciate if I can access the host from remote host, just like tomcat.

Not able to start

I've clone the project and installed depenencies. When i am trying to run npm start it gives me below error
npm start
>[email protected] start /mongo/adminMongo
>node app.js

npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

Replace cdn with local instances

I pulled the repo, and am on a very slow mobile connection at the moment. And pulling the different cdn sources like https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css is really slow or just times out after a while. And it will block everything else, so I'm waiting 60 seconds for a new page to load each time.

When I remove the line:

    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css">

It loads at a normal speed, and it doesn't look like it is being used anyways, and even seems to be duplicate/redundant because this is also there (coll-layout.hbs):

 <link rel='stylesheet' href='/bootstrap/css/bootstrap.min.css' />

I think it would be better for the project to include these locally, instead of relying on external sources.

Also so that it will still work completely offline, or in an isolated network.

Listen on Localhost

Greetings,
I am using a dedicated server, even after updating app.json with server ip and a valid open port.
It can be only accessable via localhost using the IP and not from browsers.
Please help!

Thanks!

Can't delete or edit documents

When I click the 'Delete' button next to a document and then click 'Yes' to confirm, the server dies with this error:

/home/iast/repos/adminMongo/node_modules/mongodb/lib/mongo_client.js:465
      throw err
            ^
Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
at new ObjectID (/home/iast/repos/adminMongo/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js:38:11)
at ObjectID (/home/iast/repos/adminMongo/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/lib/bson/objectid.js:29:42)
at /home/iast/repos/adminMongo/routes/index.js:740:62
at /home/iast/repos/adminMongo/node_modules/mongodb/lib/mongo_client.js:462:11
at process._tickCallback (node.js:355:11)

Also, when I click the 'Edit' button next to a document, the server doesn't log any errors, but the UI shows a big red error message that says 'Error - Invalid document ID length'

Let me know what kind of info would be helpful in debugging. Thanks, this is a great project!

Error: double colon in host identifier

When I set mongodb://user:password@ip:port/db as it's connection_string in config.json. There will throw Error: double colon in host identifier when I set user and password in connection string.

can't start app.js straight after cloning repo

Hi , when starting fetching dependencies:

npm start

It stops with an error on module.js :327 , and I can't find any file with that name.

This is the npm-debug.log:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Users\\pbasto\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 7 info lifecycle [email protected]~start: [email protected] 8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~start: PATH: C:\Users\pbasto\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;c:\Users\pbasto\Projects\adminMongo\node_modules\.bin;C:\Program Files\nodejs;C:\Users\pbasto\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Skype\Phone\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\pbasto\AppData\Local\Programs\Git\cmd;C:\Users\pbasto\AppData\Roaming\npm 10 verbose lifecycle [email protected]~start: CWD: c:\Users\pbasto\Projects\adminMongo 11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'node app.js' ] 12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 13 info lifecycle [email protected]~start: Failed to exec start script 14 verbose stack Error: [email protected] start:node app.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (C:\Users\pbasto\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:239:16) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at EventEmitter.emit (events.js:172:7) 14 verbose stack at ChildProcess.<anonymous> (C:\Users\pbasto\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at ChildProcess.emit (events.js:172:7) 14 verbose stack at maybeClose (internal/child_process.js:821:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 15 verbose pkgid [email protected] 16 verbose cwd c:\Users\pbasto\Projects\adminMongo 17 error Windows_NT 6.1.7601 18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\pbasto\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start" 19 error node v4.3.1 20 error npm v3.8.1 21 error code ELIFECYCLE 22 error [email protected] start:node app.js22 error Exit status 1 23 error Failed at the [email protected] start script 'node app.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the admin-mongo package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node app.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs admin-mongo 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls admin-mongo 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

Thanks

Ajax support ?

Hey guys,

First I want to thanks you for this usefull project!
I was deleting documents from my collection and saw that each deletion required a page refresh.
It would be nice if AJAX, or even better, Fetch would been supported ;)

Error - nconf.get is not a function

I followed the steps on the readme under installation and I can't seem to configure a connection.

I'm trying to connect to a docker container that I have running locally. Below is the request/response that is sent/received from the app.

request
screen shot 2016-04-01 at 11 50 09 am

response
screen shot 2016-04-01 at 11 50 30 am

Node Version

$ npm version
{ npm: '3.8.3',
  ares: '1.10.1-DEV',
  http_parser: '2.6.2',
  icu: '56.1',
  modules: '47',
  node: '5.10.0',
  openssl: '1.0.2g',
  uv: '1.8.0',
  v8: '4.6.85.31',
  zlib: '1.2.8' }

Error, after connect, if auth enabled

Hello. I have issue with connecting to mongod with enabled authentication

I start mongod like this mongod --auth --syslog --fork

Then i try connect to my database with adminMongo.
mongodb://admin:pass@hostname:27017/dbname
User admin and database dbname already exist in my mongo.
And i get error:

TypeError: Cannot read property 'size' of undefined
    at /home/adminMongo/routes/index.js:1130:58
    at handleCallback (/home/adminMongo/node_modules/mongodb/lib/utils.js:96:12)
    at /home/adminMongo/node_modules/mongodb/lib/db.js:299:20
    at /home/adminMongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:778:46
    at Callbacks.emit (/home/adminMongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
    at null.messageHandler (/home/adminMongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:249:23)
    at Socket.<anonymous> (/home/adminMongo/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:265:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)

If i not pass --auth param to mongod, with authentication it's all ok.

Problem saving with referenced ObjectId

in edit document saving this

{ "_id": ObjectId("5733126eaeb1e15c3a9de734"), "_master": ObjectId("5720b9fa0dfbfc3c3463e00d"), "name": "John Doe" }

will become

{ "_id": ObjectId("5733126eaeb1e15c3a9de734"), "_master": ObjectId("5733126eaeb1e15c3a9de734"), "name": "John Doe", }

its _master ObjectId does not saved properly and copies the value of _id

here is my schema

var ContactSchema = new Schema({
    _master: {
        type: Schema.Types.ObjectId,
        required: 'Please include the master owner'
    },
    name: {
        type: String,
        required: 'Please fill in a name'
    }
});

NPM3

UNMET PEER DEPENDENCY kerberos@~0.0

Error when visiting localhost

Hello. First of all, thanks for making this GUI, it seems very useful. Unfortunately, I can't run it at the moment...

After cloning the repo, and installing the dependencies, I tried "npm start". (I am using Mingw64, on Windows 10 64 bits)
But when I tried accessing http://127.0.0.1:1234 in my browser, I had errors pop up in the shell:

$ npm start

[email protected] start C:\Users\Benoît\Documents\Projects\Mongo\adminMongo
node app.js

(node:10616) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
adminMongo listening on host: http://127.0.0.1:1234
C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\node_modules\mongodb\lib\mongo_client.js:409
throw err
^

TypeError: Cannot read property 'indexOf' of undefined
at module.exports (C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\node_modules\parse-mongo-url\index.js:10:10)
at new Database (C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\node_modules\mongojs\lib\database.js:43:20)
at module.exports (C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\node_modules\mongojs\index.js:5:12)
at C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\routes\index.js:103:22
at C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\node_modules\mongodb\lib\mongo_client.js:406:11
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the admin-mongo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs admin-mongo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls admin-mongo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Benoît\Documents\Projects\Mongo\adminMongo\npm-debug.log`

I tried tampering with the config file, adding the options:
{ "app": { "host": "127.0.0.1", "port": 1234, "docs_per_page": 15 } }
to no avail. (I even tried setting a password. The prompt for the password worked, but as soon as it tried to connect, the same errors appeared.)

I included the npm-debug log:
npm-debug.txt

I hope I gave you all the information needed, if not, I will provide anything needed. Thanks again for the GUI, and for taking time reading this issue.

404 on Create User

After fill the user fields and click on the Create User button. a message up the base of page. The console output prints

POST http: // localhost: 1234 / portal / db-portal // user_create 404 (Not Found)
adminMongo.js: 197n.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.