I just started to work more and more with JavaScript, Angular, HTML, CSS and so, the next step is also to go with NodeJS as the backend. I read a lot an decided to go with MEAN.JS. Following is how to install everything needed on the MAC. From Node, MongoDB, Yeoman, Homebrew and so on.

 

Prerequisites

Before you begin, you should make sure you have installed all these prerequisites on your development machine.

The first is to change the owner of “/usr/local”  to the with the following command:

It is not reccomended to use the npm command with sudo.

The second would be to install the the Apple command line developer tools. I think, the best way to do it, is by installing XCODE. Yes you then have another big IDE, but it installs much more.
But this way, you dont need to have a developer account.
I did it by Installing XCODE, you can just install the command line tools. XCODE can be installed from the AppStore:
https://itunes.apple.com/us/app/xcode/id497799835?mt=12.

The third is to install homebrew. Homebrew is the package manager for MAC. The installation is pretty easy, type the following in you command line:

 

then run the homebrew doctor like this:

 

After this, you can install tools like this:

 

Install NodeJS and npm

Download & Install Node.js and the npm package manager, if you encounter any problems, you can also use this Github Gist to install Node.js.

 

Install MongoDB

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/

We will install MongoDB through howebrew. Make sure homebrew is uptodate by executing this command:

Then lets install MongoDB with the following command:

To run MongoDB, we have to create de default data directory for our MongoDB by:

the user monogd must have write access.

Run MongoDB on the default port (27017) with:

 

Install Bower

You’re going to use the Bower Package Manager to manage your front-end packages, in order to install it make sure you’ve installed Node.js and npm, then install bower globally using npm:

 

Install Grunt

You’re going to use the Grunt Task Runner to automate your development process, in order to install it make sure you’ve installed Node.js and npm, then install grunt globally using npm:

 

 

Install Yeoman

MeanJS uses Yeoman, THE WEB’S SCAFFOLDING TOOL FOR MODERN WEBAPPS.
Install Yeoman globaly with:

 

Install MeanJS generator for Yeoman

You are now ready to get started with the MEAN.JS generator. The generator will help you create a MEAN.JS application, a CRUD module, Angular Module, and other AngularJS/Express entities. We’ll begin with the application generator.

Application Generator

The application generator will help you create a fresh copy of a MEAN.JS application in your working folder. To create your MEAN application, navigate to a new project folder, and then use yo to generate your application:

The generator will ask you a few questions about your new application and will generate it for you. When the installation process is over, you will be able to use grunt to run your new MEAN application:

The application generator does a great job scaffolding a whole application for us.

Read more about MeanJS generators here: http://meanjs.org/generator.html

 

Install the MEAN stack on your MAC (MongoDB, Express, AngularJS, NodeJS)
Tagged on:     

Leave a Reply

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers:

Welcome Damir Kusar

Log in

Lost your password?
%d bloggers like this: