The MEAN.io stack is a wonderful application framework built on top of node.js, mongodb and Angular.JS. The installation of the whole thing is quite non-trivial, however.
We assume that node.js and npm are already installed. A good way to install mongodb is described in this article.
Create a virtual host for Apache in the regular way. In this new virtual host, add a mod_rewrite rule:
Options +FollowSymLinks -Indexes -MultiViews
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [P,L]
RewriteRule ^$ http://127.0.0.1:3000/ [P,L]
Restart the Apache server. Now install the rest:
#Get the mean cmdline
sudo npm install -g meanio@latest
#Create your first app
mean init myApp
cd myApp && npm install
sudo npm i -g bower
sudo bower install --allow-root
#Install grunt system-wide and locally
sudo npm install -g grunt
sudo npm install -g grunt-cli
npm install grunt
Inspect “config/env/development.js”, modify the line “db: ‘mongodb://localhost/mean-dev'” like:
If the auth above is working correctly, the mean.io stack will work. Run the development environment.
If everything is done correctly, you should see it on your development host without problems like the below.