MEAN.JS is an open-source JavaScript framework used for developing web applications rapidly. It provides a set of tools including MongoDB, Express, Angular, and Node.js for simplifying the development process. It uses a single programming language and can handle all aspects of an application.
In this guide, we will show you how to install MEAN.JS on Debian 10.
Prerequisites
- A fresh Debian 10 server on the Atlantic.Net Cloud Platform
- A root password configured on your server
Step 1 – Create Atlantic.Net Cloud Server
First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Debian 10 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.
Once you are logged in to your Debian 10 server, run the following command to update your base system with the latest available packages.
apt-get update -y
Step 2 – Install MongoDB
First, you will need to install the MongoDB database on your server. By default, MongoDB is not included in the Debian 10 default repository, so you will need to add the MongoDB repository to your server.
First, install all the required dependencies with the following command:
apt-get install dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl -y
Next, add the GPG key and MongoDB repository with the following command:
curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - add-apt-repository 'deb https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main'
Next, update the repository and install MongoDB with the following command:
apt-get update -y apt-get install mongodb-org -y
After installing MongoDB, start the MongoDB service and enable it to start at system reboot:
systemctl start mongod.service systemctl enable mongod.service
Step 3 – Install Node.js
Next, you will need to install Node.js on your server.
First, add the Node source repository with the following command:
curl -sL https://deb.nodesource.com/setup_14.x | bash -
Next, install the Node.js and other packages with the following command:
apt-get install nodejs gcc g++ make git python2 -y
Once all the packages are installed, verify the Node.js version with the following command:
node --version
You should see the following output:
v14.17.1
Next, install the Yarn and Gulp package with the following command:
npm install -g yarn npm install -g grunt-cli npm install -g gulp
Once all the packages are installed, you can proceed to the next step.
Step 4 – Install MEAN.JS
First, download the latest version of MEAN from the Git repository using the following command:
git clone https://github.com/meanjs/mean.git meanjs
Once the download is completed, change the directory to the downloaded directory and install all required dependencies with the following command:
cd meanjs/ yarn install
Once all the dependencies are installed, you can proceed to the next step.
Step 5 – Launch MEAN.JS
At this point, MEAN.JS is installed on your server. You can now start the MEAN.JS with the following command:
npm start
You should see the following output:
MEAN.JS - Development Environment Environment: development Server: http://0.0.0.0:3000 Database: mongodb://localhost/mean-dev App version: 0.6.0 MEAN.JS version: 0.6.0
At this point, MEAN.JS is started and listen on port 3000.
Step 6 – Access MEAN.JS
Now, open your web browser and access the MEAN.JS web interface using the URL http://your-server-ip:3000. You should see the MEAN.JS web interface on the following screen:
Conclusion
Congratulations! You have successfully installed MEAN.JS on Debian 10. You can now start developing dynamic web applications using MEAN.JS; get started on dedicated server hosting from Atlantic.Net.