/meanr-full-stack

MEANR (MongoDB, Express, AngularJS, Node.js, Redis) stack with Chef for DevOps and Capistrano for Deployment

Primary LanguageJavaScript

MEANR Full Stack

MEANR is a boilerplate that provides a starting point for MongoDB, Node.js, Express, AngularJS and Redis based applications.

Optionally you can use a DevOps and deployment strategy using Ruby with Chef-Solo and Capistrano.

Both the MEANR web application and the DevOps/Deployment come with a broad range of test suites.

The sample application is a simple Articles create, read, update and destroy (CRUD) web site.

Client-side

Server-side

Data Storage

Testing

Tools

  • Grunt task runner
  • Bower front-end package management

Build Status

Code Climate

Purpose

Demonstration and starting point of how to develop and deloy a MEANR application.

Emphasis on a professional level of development with deployment and broad suite of tests.

To help spread the word and improve on the "MEANR Stack with DevOps" goodness.

To learn about and improve on the MEANR Stack.

(Optional) DevOps and Deployment with Ruby:

Quick Install

A youtube screencast of the following quick install steps is available at http://youtu.be/WzvgWYE9XnY

You should have a MongoDB and Redis servers running. The default address for these in config/env/development.json is set to localhost

Install global node dependencies Grunt and Bower

npm install -g grunt-cli bower

Clone the git repository and cd into it

git clone git@github.com:rudijs/meanr-full-stack.git
cd meanr-full-stack/

Optional but good practice to install git flow

git flow init

Install node dependencies based on the package.json configuration

npm install

Install front-end dependencies with Bower based on the bower.json configuration

bower install

Copy all example/* configuration files into place

grunt init

Start the server

grunt serve

Then open a browser and go to:

http://localhost:3000

Running the Tests

With MongoDB, Redis and the node MEANR application running you can run most of the tests right away.

Node Tests

grunt test

AngularJS Karma Unit Tests

grunt karma

Javascript code linting tests

grunt jshint

The API tests have a database dependency you'll need to meet before these tests will pass

First add a test user account to Mongodb

mongoimport -h 127.0.0.1 --db meanr-dev --collection users --file test/fixtures/db/users.json

Run the API tests

npm test

The Protractor End-to-End test have some dependencies you'll need to meet before these tests will pass

Installation:

npm install -g protractor
webdriver-manager update

Start the Selenium server

webdriver-manager start

Open a new terminal and run tests in Chrome

grunt e2e

Full Install

The full install includes using a Virtual Box (Vagrant) Virtual Machine with a server provisioning and deployment process.

This part uses Ruby software - Chef-Solo for DevOps and Capistrano for deployment.

See the docs/ folder for detailed information.

Here is two images which outline the full install process:

Workflow

MEANR Flow

MEANR Stack Types

MEANR Stack Types

Credits and Inspired by

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.