From charlesreid1

(Created page with "Github link: https://github.com/mongo-express/mongo-express Category:MongoDB Category:Database Category:Bootstrap")
 
m (Replacing charlesreid1.com:3000 with git.charlesreid1.com)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Github link: https://github.com/mongo-express/mongo-express
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
 
=Basics=
 
==Installing==
 
Start by installing [[Node]].
 
===global===
 
To install mongo-express globally:
 
<pre>
npm install -g mongo-express
</pre>
 
===local===
 
To install mongo-express locally:
 
<pre>
npm install mongo-express
</pre>
 
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 <code>/usr/lib/node_modules</code>
* Your mongo express config file is in <code>/usr/lib/node_modules/mongo-express/config.js</code>
 
If you installed locally:
* Your node_module directory is <code>YOUR_PATH/node_modules</code>
* Your mongo express config file is in <code>YOUR_PATH/node_modules/mongo-express/config.js</code>
 
==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:
 
<pre>
mongo-express
</pre>
 
to specify a username and password to protect interface:
 
<pre>
mongo-express -u user -p password -d database
</pre>
 
to use on another host/port:
 
<pre>
mongo-express -u user -p password -d database -H mongoDBHost -P mongoDBPort
</pre>
 
to give access to the MongoDB database as an administrator, use the -a flag:
 
<pre>
mongo-express -a -u superuser -p password
</pre>
 
===local===
 
If you installed mongo-express locally:
 
<pre>
cd YOUR_PATH/node_modules/mongo-express/ && node app.js
</pre>


[[Category:MongoDB]]
[[Category:MongoDB]]
[[Category:Database]]
[[Category:Database]]
[[Category:Bootstrap]]
[[Category:Bootstrap]]
[[Category:MongoExpress]]
[[Category:2018]]
[[Category:February 2018]]

Latest revision as of 03:41, 9 October 2019

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

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