- Mongo DB – The Leading NoSQL database
- Express JS – The Web Application Framework
- Angular JS – The HTML enhanced Web Apps
- Node JS – a platform to build scalable network applications
With MEAN, you could have your web application running in less than 10 minutes.
Deploying a MEAN based application on AWS or Azure is quite straightforward as there are ready-made templates from 3rd party vendors like Bitnami. Nevertheless, it’s not that easy on Google Compute Engine, given that there are no built-in images for that platform.
In this post, I will describe the rationale in choosing MEAN stack over others, and 10 Steps to deploy a MEAN stack on Google Compute Engine
We have had rich experience in creating many enterprise application using J2EE, Python, .Net and other technologies. You may wonder why on earth we chose MEAN! Let me list down the reasons:
- AngularJS supports a native MVC framework and promotes Test Driven Development with the Karma/Mocha test framework. AngularJS UI renders on all kinds of browsers supporting HTML5 supported.
- ExpressJS is a good web framework on top of NodeJS. It provides us hooks to easily develop a scalable application server.
So, all this considered, here are the steps to deploy a MEAN stack on GCP
Step 1: Sign up for Google Compute Engine, or sign in if you have an account already
Step 2: Create a project or Go into your existing Project
Step 3: Go to Google Compute Engine -> VM Instances
Step 4: Create a CentOS based VM Instance
Step 5: Once the VM is up, SSH into the VM Instance
gcutil --service_version="v1" --project="##your_project" ssh --zone="asia-east1-a" "my-mean-stack"
Step 6: Download NodeJS and Place it on your path:
tar xvfz node-v0.10.28-linux-x64.tar.gz
mv node-v0.10.28-linux-x64 /usr/share/
Step 7: Install MongoDB and git:
sudo yum install mongodb-org git
Step 8: Deploy meanio module
$sudo npm install -g meanio
$mean init my-mean-app
Cloning branch: master into destination folder: my-mean-app
Initialized empty Git repository in /home/user/my-mean-app/.git/
$ cd my-mean-app && npm install
Step 9: Start your server
Running "clean:0" (clean) task
Running "jshint:all" (jshint) task
>> 41 files lint free.
Running "csslint:src" (csslint) task
>> 3 files lint free.
Running "concurrent:tasks" (concurrent) task
Running "watch" task
Running "nodemon:dev" (nodemon) task
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node --debug server.js`
debugger listening on port 5858
js-bson: Failed to load c++ bson extension, using pure JS version
Mean app started on port 3000 (development)
Failed to load c++ bson extension, using pure JS version
Step 10: Open up port 3000 in your Google Compute Network Firewall
TThat’sit! Launch your browser and point it to
http://your_external_ip:3000/. Your web app is up and running!
New on Cloud Academy: ITIL® 4, Microsoft 365 Tenant, Jenkins, TOGAF® 9.1, and more
At Cloud Academy, we're always striving to make improvements to our training platform. Based on your feedback, we released some new features to help make it easier for you to continue studying. These new features allow you to: Remove content from “Continue Studying” section Disc...
Cloud Migration Risks & Benefits
If you’re like most businesses, you already have at least one workload running in the cloud. However, that doesn’t mean that cloud migration is right for everyone. While cloud environments are generally scalable, reliable, and highly available, those won’t be the only considerations dri...
Google Cloud Functions vs. AWS Lambda: The Fight for Serverless Cloud Domination
Serverless computing: What is it and why is it important? A quick background The general concept of serverless computing was introduced to the market by Amazon Web Services (AWS) around 2014 with the release of AWS Lambda. As we know, cloud computing has made it possible for users to ...
New on Cloud Academy: CISSP, AWS, Azure, & DevOps Labs, Python for Beginners, and more…
As Hurricane Dorian intensifies, it looks like Floridians across the entire state might have to hunker down for another big one. If you've gone through a hurricane, you know that preparing for one is no joke. You'll need a survival kit with plenty of water, flashlights, batteries, and n...
How to Unlock Complimentary Access to Cloud Academy
Are you looking to get trained or certified on AWS, Azure, Google Cloud Platform, DevOps, Cloud Security, Python, Java, or another technical skill? Then you'll want to mark your calendars for August 23, 2019. Starting Friday at 12:00 a.m. PDT (3:00 a.m. EDT), Cloud Academy is offering c...
Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More
Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...
Disadvantages of Cloud Computing
If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are CPU, memory, storage, and network connectivity. Which resources you choose for your delivery — cloud-based or local — is up to you. But you’ll definitely want...
How to Effectively Use Azure Management Groups, Subscriptions, and Resource Groups
When used individually, Azure Management Groups, Subscriptions, and Resource Groups are very powerful. But when used together, they can establish the entire organizational structure of Azure. In this article, I will explain Azure Resource Manager, Management Groups, Subscriptions an...
Cloud Academy’s Blog Digest: July 2019
July has been a very exciting month for us at Cloud Academy. On July 10, we officially joined forces with QA, the UK’s largest B2B skills provider (read the announcement). Over the coming weeks, you will see additions from QA’s massive catalog of 500+ certification courses and 1500+ ins...
Top 10 Things Cybersecurity Professionals Need to Know
There has been an increase in data breaches over the recent years. With almost 143 million Americans who have had their data compromised in data breaches. These breaches include all sorts of sensitive data, including financial information, election controversies, social security, just t...
Running Apache Spark on Azure Databricks
In this article, we’ll cover how to set up an Azure Databricks cluster and how to run queries in an interactive notebook. However, this article only scratches the surface of what you can do with Azure Databricks. If you would like to learn more, including how to create graphs, run sched...
Understanding the Core Azure Architectural Components
Microsoft Azure relies on a few key architectural components to provide redundancy and high availability. Core Azure architectural components include Azure regions, Azure Availability Zones, resource groups, and the Azure Resource Manager. In this article, we’ll discuss the basics ab...