How to install MEANJS stack

| Last Updated: | In: angular js, Freebies, Javascript & Ajax


What is MEAN.JS?

MEAN is a full-stack Software solution that helps to build your next web application fast, robust, and maintainable production using MongoDB, Express, AngularJS, and Node.js.

Why MEAN.JS?

While keeping your application organized the MEANJS will help you to avoid useless grunt work and common pitfalls. The main aim is to maintain a simple and readable open-source web solution that you can use and trust in your projects.

meanjs

The MEAN components are as follows:

MongoDB, a NoSQL database (Go through MongoDB Official Website and proceed to its Great Manual, which should help you understand NoSQL and MongoDB better)
Express.js, a web application framework that runs on Node.js
Angular.js, a JavaScript MVC framework that runs in browser JavaScript engines
Node.js, an execution environment for event-driven server-side and networking applications

Prerequisites

  • GIT $ git --version
  • Node.js & npm $ npm install and $ npm install -g bower
  • MongoDB
  • Bower
  • Grunt $ npm install -g grunt-cli
  • Gulp (Optional) $ npm install -g gulp

Download MEANJS

There are two ways to install MEANJS first you can use Git repository to directly clone the MEAN.JS by using bellow command $ git clone https://github.com/meanjs/mean.git meanjs. This will clone the latest version of MEANJS on your local machine and second you can downlod directly using this command $ wget https://github.com/meanjs/mean/archive/v0.4.2.zip

Install MEANJS

After above steps run this command $ npm install, This command will install all dependencies needed for your application to run. Then finally run your application with Grunt command like $ grunt

If you are getting some warning after running the above command, then you can also use this $ grunt -serve OR $ grunt -force, but try to avoid using $ grunt -force command.

Configuring Social Media with your application
by using bellow code snippets you can configure the social media services with your application.

Facebook
$ cf cups mean-facebook -p '{"id":"facebookId","secret":"facebookSecret"}'
$ cf bind-service mean mean-facebook

Email
$ cf cups mean-mail -p '{"from":"fromEmail","service":"emailService","username":"emailServiceUsername",
"password":"emailServicePassword"}'
$ cf bind-service mean mean-mail

Twitter
$ cf cups mean-twitter -p '{"key":"twitterKey","secret":"twitterSecret"}'
$ cf bind-service mean mean-twitter

Google
$ cf cups mean-google -p '{"id":"googleId","secret":"googleSecret"}'
$ cf bind-service mean mean-google

LinkedIn
$ cf cups mean-linkedin -p '{"id":"linkedinId","secret":"linkedinSecret"}'
$ cf bind-service mean mean-linkedin

Please don’t forget to subscribe our newsletter or join us on Facebook to be the first to learn the next great thing from freewebmentor.

Tags: , , , , ,


About: Prem Tiwari

Prem Tiwari is founder of freewebmentor.com and Software developer from New Delhi (India). Follow Prem's development codes on facebook, and make sure you check out freewebmentor.com for the latest in web development related Tips with the complete code.


You may also like:

Follow us!

Get Free Access of 350+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW