MongoDB Web GUI client

MongoDB Web GUI client

https://github.com/arunbandari/mongo-gui

npm install to run mongo-gui with pm2

# npm install
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

# Check  if nvm is installed
command -v nvm

# Install node
nvm install node
node --version
npm --version
npm install pm2 -g

# Install mongo-gui
npm install -g mongo-gui

# Start mongo-gui and connect to mongo with TLS
mongo-gui -u mongodb://MY.MONGO.HOST?tls=true

# Run mongo-gui with pm2
pm2 start mongo-gui -- -u mongodb://MY.MONGO.HOST?tls=true

# Enable SSL
sudo certbot --nginx

# Add Basic auth
sudo htpasswd -c /etc/nginx/.htpasswd YOUR-USER-NAME

# Change /etc/nginx/sites-available/YOUR-CONF.conf

(...)
    location / {
        auth_basic "Requires authentication:";
        auth_basic_user_file /etc/nginx/.htpasswd;
(...)

Now access https://MY.MONGO.HOST