Prerequisites
Why MEAN Stack?
The MEAN (Mongo, Express, Angular, and Node) stack is an efficient and powerful approach to building web applications. Because all components of the MEAN stack support program are written in JavaScript, MEAN applications can be written in one language for both server-side and client-side execution environments.
The components of the MEAN stack are as follows.
- MongoDB, a leading NoSQL database, empowering businesses to be more agile and scalable.
- Express.js, a web application framework that runs on Node.js, providing a robust set of features for building single and multi-page, and hybrid web applications.
- Angular.js, a JavaScript MVC framework that runs in browser JavaScript engines. The resulting environment is extraordinarily expressive, readable, and quick to develop.
- Node.js, an execution environment for easily building fast, scalable network applications.
Benefits of the MEAN Stack
- MEAN Stack is open-sourced.
- Everything runs on a single language.
- A MEAN Stack can run on any operating system.
- It’s ultimately faster and easier to scale. MongoDB is a NoSQL database which optimizes queries.
- Separates the code for maintainability and growth.
- This makes it easier to organize your JavaScript web apps so they run in a natural environment.
MEAN vs. LAMP Stack
LAMP might become outdated in the near future. However, the MEAN Stack is surely an innovative, new, and cutting-edge technology package that will possibly overcome the market shortly.
Technology |
LAMP |
MEAN |
Languages |
Perl/PHP/Python |
AngularJS: Extension of JavaScript |
Database |
MySQL (RDBMS) |
MongoDB (NoSQL database) |
Web Server |
Apache: Commonly used |
ExpressJS: is a Node.js web application framework |
Servers |
Linux |
Node.js (Execution Environment), any OS |
Pre-configured stacks in Azure Marketplace: The Azure Marketplace has many pre-configured Node.js stacks, including Mean.io, Jelastic Hybrid PaaS, and Bitnami MEAN Stack. We can start playing around with these and deploy a fully configured stack on Azure within minutes.
Now, let's get started with the following steps.
New Create Virtual Machine blade and provide the required following values for configuring our MEAN Stack. Click OK to continue to the next section.
- Enter name of the MEAN Stack.
- Select Disk Type SSD or Hard Disk.
- Enter the Username of the MEAN Stack.
- Select Authentication Type either SSH or Password.
- Enter the Password.
- Select Subscription.
- Resource Group - select an existing resource group, or create a new one.
- Select Location.
VM Size
Choose a VM size, and then click "Select" to continue.
Storage and Network
In Settings, leave the defaults for Storage and Network values, and click "OK".
Summary
Click Summary to review your choices. When you see the Validation passed message, click "OK".
Purchase
In the "Buy" tab, review the terms of use and click "Purchase" to proceed.
The process usually takes a few minutes. Once the template has been provisioned, we will see a notification and the new instances and related resources will appear in the "Resource groups" section of the Microsoft Azure management console.
Summary
So, this is how we can build MEAN Stack on Microsoft Azure Portal.