What is mean.io?

Mean stands for : Mongodb, Express, AngularJS and node.js

  • Mongodb : MongoDB is the leading NoSQL database, empowering businesses to be more agile and scalable.
  • Express : Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.
  • AngularJS : AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
  • Node.js : Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications.

Mean.io Installation

Before installting mean.io we have to install certain pre-requisities. Some of them are written below with versions that i’m using

  • NodeJS – v0.10.28
  • Bower – 1.3.3
  • npm – 1.4.9
  • Mongodb –  MongoDB shell version: 2.4.1

Let’s install them one by one

  1. Node.js :
    NOTE: When you installed node.js “npm” automatically installed no need to install it manually. We Install node.js through apt-get, run following commands on your terminal

    • sudo apt-get install python-software-properties
    • sudo apt-add-repository ppa:chris-lea/node.js
    • sudo apt-get update
    • sudo apt-get install nodejs
  2. Mongodb :

    • sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    • echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
    • sudo apt-get update
    • sudo apt-get install mongodb-10gen
      To pin a package, issue the following command at the system prompt to pin the version of MongoDB at the currently installed version: 
      $ echo "mongodb-10gen hold" | sudo dpkg --set-selections
      sudo service mongodb start
      sudo service mongodb stop

      Restart MongoDB

      sudo service mongodb restart
  3. Mean.io :
    • sudo npm install -g meanio@latest
    • sudo apt-get install git
    • mean init myApp
    • cd myApp
    • sudo npm install -g bower
    • npm install
    • Lastly type "grunt" in myApp folder.

Congrats you have installed mean.io. Have fun! 🙂

Errors And Solutions :

  1. If you face error somewhat like :
    > kerberos@0.0.3 install /home/deepak/myApp/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
    > (node-gyp rebuild 2> builderror.log) || (exit 0)

    Try to install following
     $ sudo npm install -g node-gyp
  2. If you face error like :
    No command ‘grunt’ found, did you mean:
    Command ‘grun’ from package ‘grun’ (universe)
    grunt: command not found

    Then try to install following command on terminal
     $ sudo npm install -g grunt-cli
     $ cd ~
     $ npm update

    Now type “grunt in myApp folder”. If it run succesfully, open your browser and type “localhost:3000”.