adminMongo is a Web based 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.
- Clone Repository:
git clone https://github.com/mrvautin/adminMongo.git && cd adminMongo
- Install dependencies:
npm install
- Start application:
npm start
- Visit http://127.0.0.1:1234 in your browser
- Manage from a connection level for easy access to multiple databases
- Create/Delete databases
- Create/Delete/Edit collection
- Create/Delete/Edit documents
- Create/Delete indexes
- Query documents
- Collection statistics
- Export collections in JSON format
- 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.
adminMongo will listen on host: localhost
and port: 1234
by default.
This can be overwritten by adding a config file in /config/app.json
. The config file can also override the default 5 docs per page.
The config file options are:
{
"app": {
"host": "10.0.0.1",
"port": 4321,
"docs_per_page": 15,
"password": "secureadminpassword",
"locale": "de"
}
}
Note: Any changes to the config file requires a restart of the application
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.
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.
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.
Note: The connection can be either local or remote hosted on VPS or MongoDB service such as MongoLab.
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
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.
You can search 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".
You can clear your search by clicking the
Reset
button on the collections screen.
Adding and editing documents is done using a JSON syntax highlighting control.
Indexes can be added from the collection screen. Please see the official MongoDB documentation on adding indexes.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Please make any suggestions.