From charlesreid1

No edit summary
Line 1: Line 1:
Github link: https://github.com/mongo-express/mongo-express
Github link: https://github.com/mongo-express/mongo-express


=Installing=
=Basics=
 
==Installing==


Start by installing [[Node]].
Start by installing [[Node]].
===global===


To install mongo-express globally:
To install mongo-express globally:
Line 10: Line 14:
npm install -g mongo-express
npm install -g mongo-express
</pre>
</pre>
===local===


To install mongo-express locally:
To install mongo-express locally:
Line 17: Line 23:
</pre>
</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]]

Revision as of 13:32, 30 January 2018

Github link: https://github.com/mongo-express/mongo-express

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