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.  It is a great tool for framework for really accelerating your web development process making use of the MEAN stack.

Judging by the myriad of blog posts out there, it appears most of the developers out there using the MEAN stack are predominantly using MacBooks etc. However, this doesn’t mean you can’t develop using the mean stack on Linux. There are just a few tweaks you need to do to get it running.

Install MongoDB and Node.js on your ubuntu desktop;

Update
In order to make life easier I have created a quick bash script to install all necessary components to get up and running with meanjs. After executing the bash script you can go directly to Get a project up and running with mean.js





 

In order to use the mean.js you will need to install the yeoman generator , which is a scaffolding tool for web applications. Yeoman helps you kickstart new projects, prescribing best practices and tools to help you stay productive.

This is will install the generator and you’re almost ready to install Mean.js, however in order to get yeoman to work on your ubuntu machine there is one little hack you need to do.  Yeo man needs to run using your superuser permissions, so you need to create a bash script for it to do so.

Once you’ve done that you can run simply run the yeoman generator,

Install Ruby

Install Sass

Get a project up and running with mean.js

Although we have completed a few basics on how to generate a project with mean.js, there as still a few little quirks to remove friction points on your ubuntu desktop. I’ll guide you through a process of how I successfully got this to work.

I’ll create a little demo project and use my favourite IDE WebStorm by jetbrains

First step is step is to create a directory for your project and then change directory

Secondly generate your meanjs project

The generator will now start and you will need to answer some basic questions about your application.

yeoman generator

Complete your basic questions with relevant details

meanjs2

The generation should now complete

meanjs3

You can now open you project in WebStorm

meanjs4You now need to open your terminal window in WebStorm ( alt + f12)

Just check your npm version to ensure you have he latest version , at the time this was 1.4.28

meanjs5

Now install the bower based dependencies into your project, you may need to install bower globally first.

now you should be able to run grunt and start the website

Open your browser and navigate to http://localhost:3000 , you should see the default generated for you.

meanjs6




The guys over at meanjs.org have put together a great video tutorial explaining how to use mean.js. I recommend watching this, not only is it entertaining in a geek way, but it is also has some very useful tips!

Mean.js also has some really good documentation to read to get you up to speed. Check it out on http://meanjs.org/docs.html#overview

Have fun playing around with mean.js and please do let me know if you have any more questions or even if you have some additional tips, in the comment section below.

Gary Woodfine

Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines. A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

π