How to install Bower globally

Bower is a package manager for front-end components.

In order to install it, you first need to install Node.js, and have the npm permissions fixed. then:

1. Install Bower using npm:
$ npm install -g bower


sources:

How to install Bower globally

Create a MEAN.js application

What is MEAN.JS?

MEAN.JS is a full-stack JavaScript solution that helps you build fast, robust, and maintainable production web applications using MongoDB, Express, AngularJS, and Node.js.

Why MEAN.JS?

MEAN.JS will help you getting started and avoid useless grunt work and common pitfalls, while keeping your application organized. Our goal is to create and maintain a simple and readable open-source solution that you can use and trust in your projects.

meanjs.org

I. Install

1- Install yeoman
sudo npm install -g yo

NOTE 1:
you should have npm already installed.

After the installation, Yeoman Doctor will tell you that everything looks all right, in a message like this one (PS: he is a cool guy :D).

2- Install MEAN.JS generator:
npm install -g generator-meanjs

II. Generate the application

1- navigate to your working folder:
# for example :
cd /projects/js/meanApp

2- then use yo to generate your meanjs application
yo meanjs

You’ll have a short discussion with yeoman about your app setting, then he will scaffolds the whole application for you .

NOTE 2:

Or this is what is supposed to happen, in my case, after answering the last question, the installation goes smoothly for some seconds; then a horde of WARN and ERR! appears.That was caused by some permission error (which was indicated by EACCES), so, to deal with it I had to :

1. change the owner of the folder ./npm :
sudo chown my_user_name -R ~/.npm

2. clean the application directory:
by removing /meanApp directory, and recreate it again.

3. start over from the first step

PS: thanks liorkesos

3- run the application with grunt:
grunt

Now you can go to your favorite browser and type the address:
127.0.0.1:3000 or localhost:3000 to get this nice page telling you:

Congrats! You’ve configured and run the sample application.

MEAN.JS is a web application boilerplate, which means you should start changing everything :-)

– The MEAN.JS Team.

To add CRUD functionalities to this app please watch this video:

つづく


sources :

Create a MEAN.js application

How-to install MongoDB in Ubuntu 14.04 LTS

I. Install

  1. Import the public key used by the package management system
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

  2. Create a list file for MongoDB
    echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

  3. Reload local package database
    sudo apt-get update

  4. Install the latest stable version of MongoDB.
    sudo apt-get install -y mongodb-org

II. Run

  1. Start mongod:
    sudo service mongod start

  2. Stop:
    sudo service mongod stop

  3. Restart:
    sudo service mongod restart

III. Uninstall

  1. Stop mongoDB (cf II.2).

  2. Remove Packages:
    sudo apt-get purge mongodb-org*

  3. Remove Data Directories:
    sudo rm -r /var/log/mongodb
    sudo rm -r /var/lib/mongodb


sources:

How-to install MongoDB in Ubuntu 14.04 LTS

How-to Install the last version of Node.js (Node.js v0.12) and npm in Ubuntu 14.04 LTS

  1. First, you need to install the PPA in order to get access to its contents:
    $ curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
NOTE: 
If you get, after step 1, this error message :
The program ‘curl’ is currently not installed. You can install it by typing: sudo apt-get install curlUpdate with:
$ sudo apt-get update

Then, install cURL:
$ sudo apt-get install curl
  1. Then install nodejs with:
    $ sudo apt-get install -y nodejs
  2. Now you have nodejs and npm installed (so, no need to install npm separately). However, in order for some npm packages to work, you will need to install the build-essentials package:
    $ sudo apt-get install build-essential

  3. The last step: in order to be able to install some npm packages globally without being stopped by EACCES errors is :
    fixing npm permissions


sources :

How-to Install the last version of Node.js (Node.js v0.12) and npm in Ubuntu 14.04 LTS