mjwrazor
mjwrazor

Reputation: 1964

Mean Stack installation

Okay I have been working on getting a mean stack started on cloud 9 but have run into many issues.

  1. Do I use Mean.io/ Meanjs.org/ or do I personally install the mongo/express/angular/nodejs myself.

  2. What are the differences +'s and -'s to each. I am trying to make a Portfolio page for myself so I will try to use everything the stack has to offer.

I have seen installs tutorials for ubuntu but I can't find any new tutorials. Everything seems to be 2014 or early 2015. Many of the steps in tutorials no longer work the same as they did in the tutorials.

  1. Can someone explain the file structure of Mean stack? What is useful and not useful. I ended up getting mean on cloud 9 after many issues but it has an app already on it and it seems to just be the Meanjs home page. What do I need to get rid of and what do I need to keep in order to start from scratch.

I am brand new to mean but have used and know all of the stack pieces except express. I am used to Meteor which is essentially the same but need to learn Mean for a job. I prefer meteor for its simplicity but I believe Mean is more important since you have more control.

Edit

I ended up getting a job with MEAN stack and currently work with it daily. I like the generators but I think starting with generators is great but making it from scratch really get's me learning. I hope to make my own generator.

Upvotes: 0

Views: 285

Answers (3)

Theo Itzaris
Theo Itzaris

Reputation: 4671

I also create MEAN stack with the yoeman like this:

For Example, for phones project(client): c:\mean\phones\client

  1. c:\mean\phones\npm install -g yo
  2. c:\mean\phones\client\npm install -g gulp generator-gulp-angular // angular with gulp generator
  3. c:\mean\phones\client\yo gulp-angular //it starts the install wizard
  4. Install Restangular to communicate between client and server like so:
    bower install --save restangular
  5. c:\mean\phones\client\gulp serve it starts an http server to show the angular page

Server side: c:\mean\phones\server

  1. c:\mean\phones\server\ npm install --save express install express
  2. c:\mean\phones\server\ npm install --save mongoose install mongoose
  3. c:\mean\phones\server\ npm install --save node-restful
  4. c:\mean\phones\server\ npm install --save method-override
  5. c:\mean\phones\server\ npm install --save body-parser

  6. Create automatically a node express project like so: c:\mean\phones\server\express my-project

  7. You can start the server like so: nodemon , so that on your every change it will restart

Last but not least you have to be careful how the restangular communicates with the node server in order to fetch/delete/update etc data, into your index.config.js:

   function config($logProvider, toastrConfig, RestangularProvider) {
    //set the base url of the rest api server
    RestangularProvider.setBaseUrl('http://localhost:3000');
    // Enable log
    $logProvider.debugEnabled(true);
  }

})();

Upvotes: 0

Divyanshu sachdeva
Divyanshu sachdeva

Reputation: 703

  1. The difference between Mean.io and Mean.org is provided here :-

  2. It would be better if you will install MongoDB/Express/Angular/Nodejs that way you will get the flow and the architecture of Mean stack. This link will help you in setting up step by step MongoDB, Express,Angular and node JS :- http://meanjs.org/docs/0.3.x/

  3. For Reference go through this application MEAN Stack User Registration and Login Example & Tutorial -- it explains login form and User registration using Mean stack

  4. Here is the link for basic CRUD apllication to get started with mean application and get a gist of it.

  5. An amazing TO-DO'S application that is also build using MEANJS

Best of luck for your application!!

Upvotes: 2

Fabrizio Migotto
Fabrizio Migotto

Reputation: 297

If you are new with the MEAN stack I recommend you to use: https://github.com/angular-fullstack/generator-angular-fullstack

It's an MEAN generator for yeoman: http://yeoman.io/

The scaffolding and everything is explained there.

Upvotes: 1

Related Questions