Web Projects Outsourcing

Setting Up MEAN.io on Fedora with Apache

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
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ //127.0.0.1:3000/$1 [P,L]
RewriteRule ^$ //127.0.0.1:3000/ [P,L]
</IfModule>

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
#Install dependencies
cd myApp && npm install
#Install bower
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:

db: 'mongodb://[USER]:[PASS]@127.0.0.1:27017/[COLLECTION]',

If the auth above is working correctly, the mean.io stack will work. Run the development environment.

NODE_ENV=development grunt

If everything is done correctly, you should see it on your development host without problems like the below.

MEAN.io running on Fedora 14

MEAN.io on Fedora

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.