How to install Mongo Express in your guebs hosting plan

If you have reached this guide through a search engine, please note that this guide is intended for accommodation services nodejs from guebs.com. The general concepts remain valid for any application, but the specific steps apply to the guebs.com service.

This guide, developed around August 2017, is intended for version 0.42.1 of Mongo Express, which is a MongoDB collection management tool.

First we must create a subdomain to host the application. This subdomain will be called "mexpress" throughout this guide. Therefore, the subdomain will be called mexpress.yourdomain.com.

Today it is possible to use the latest LTS version of this software to launch this application, so you can use version 6 of this software. Now you just need to log in via ssh to your hosting plan to launch the application.

With this, we'll have everything we need installed. Now we have to prepare the static files and the connection configuration.

In order for the system to find the static resources that come as standard in the Mongo Express distribution, in such a way that the situation is adapted to the public/ directory from which they will be served, we must execute this command:

cp -a build public/public

To configure the connection to the database, we will use the method through a connection url. First copy the default configuration file and then edit the configuration file:

Where in the place of user and password you will have to put the data corresponding to a real MongoDB user that you have created previously from the Hosting Panel.

Once we call the subdomain, we will find the application connected to our database. By default there is an additional authentication with the user name 'admin' and the password 'pass', which you can modify by editing the following lines of the config.js file