Generate a MeanJS App using Yeoman Generator

First let's see what is MEANJS, then we gonna walk you through a simple tutorial on how to develop a meanjs app using yo generator. 
What is MEAN.JS?
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.
Why MEAN.JS?
MEAN.JS will help you getting started and avoid useless grunt work and common pitfalls, while keeping your application organized. Our goal is to create and maintain a simple and readable open-source solution that you can use and trust in your projects.
One of the most frequently asked features from MEAN users is a way to scaffold their applications.So using yeoman generator, which includes a set of simple tools, can make your life easy as a developer.
  • As the first step you have to install yo scaffolding tool,
    • npm install -g yo
  • This is only the tool, now we need to install a sub-generator which is the one we need in this tutorial.
    • npm install -g generator-meanjs
  • Now, we can start the creation of our application. First navigate to the folder in which you need to create the application and type,
    • yo meanjs
  •  Now they gonna ask you a few questions about how the application should be configured.
    • Here are few screenshots that will be useful in configuring your app






  • It will take couple of minutes to download and install dependencies.
  • Since this application use MongoDB as the database,we need to have a database instance running before starting the application.
    • You can start the mongodb server by command (MongoDB should be installed and the path should have been set before using this command),
      • mongod


  • Now the application is finalized, you need grunt to start this application, but first,


  • You're going to use the Bower Package Manager to manage your front-end packages. Make sure you've installed Node.js and npm first, then install bower globally using npm: 
    • npm install -g bower
  • Grunt - You're going to use the Grunt Task Runner to automate your development process. Make sure you've installed Node.js and npm first, then install grunt globally using npm:
    • npm install -g grunt-cli
  • Sass - You're going to use Sass to compile CSS during your grunt task. Make sure you have ruby installed, and then install Sass using gem install:
    • gem install sass   npm install -g grunt-cli
  • Gulp - (Optional) You may use Gulp for Live Reload, Linting, and SASS or LESS,
    •  npm install gulp -g    
  •  Finally use grunt to run the application,
    • grunt
 Here you can see few screenshots of the application that we have generated, Next in this MeanJS blog series we will be covering How to add a CRUD module to our created app. Click Here to get the source code. 
  •  Screnshots

Comments

Popular posts from this blog

Introduction to using ExpressJS with MongooseJS and NodeJS - Part 2

Using OAuth 2.0 Framework to Manipulate Files in Google Drive

Preventing Cross-Site Request Forgery (CSRF) with Double Submit Token Pattern