MongoExpress
From charlesreid1
The short version:
Stop wasting your time with these idiotic esoteric database configurations where 99% of it works perfectly but the one critical component (authentication) has some sloppy documentation.
Just use docker.
https://git.charlesreid1.com/docker/d-mongoexpress
https://git.charlesreid1.com/docker/d-mongodb
Contents
Basics
Installing
Start by installing Node.
global
To install mongo-express globally:
npm install -g mongo-express
local
To install mongo-express locally:
npm install mongo-express
Note that this should be run from OUTSIDE of the mongo-express directory. That is, when you run ls, you should see the mongo-express directory, not the contents of the mongo-express directory.
Configuring
If you installed globally:
- Your node_module directory is
/usr/lib/node_modules
- Your mongo express config file is in
/usr/lib/node_modules/mongo-express/config.js
If you installed locally:
- Your node_module directory is
YOUR_PATH/node_modules
- Your mongo express config file is in
YOUR_PATH/node_modules/mongo-express/config.js
Running
global
If you installed mongo-express globally, you should have a mongo-express binary on your path, and you can run it like this:
mongo-express
to specify a username and password to protect interface:
mongo-express -u user -p password -d database
to use on another host/port:
mongo-express -u user -p password -d database -H mongoDBHost -P mongoDBPort
to give access to the MongoDB database as an administrator, use the -a flag:
mongo-express -a -u superuser -p password
local
If you installed mongo-express locally:
cd YOUR_PATH/node_modules/mongo-express/ && node app.js