
Basic Mean App
This post continues Getting started with MEAN stack.
This post talks about scaffolding with Yeoman. A Scaffolding tool, as the name suggests, is a tool to generate boiler plate code conforming to preset convention. i.e What section of code goes in to which file and where does that file go.
Here’s an easy way to get an app running. It’s a generic application about books and authors.
You downloaded the MEAN source code from the previous procedure. In this one we are going to do that with a generator.
Yeoman
install it using NPM
$ npm install -g yo
$ npm install -g generator-meanjs
See what Yo has to offer.
$ yo --help
You should see a list of parameters along with currently installed generators and sub-generators.
Get Yo to generate a template application for you.
$ yo meanjs
This will ask you a few questions about what to use (use the latest stable not the master), what to generate.
you can opt to populate the app with a sample application. Yo will generate Articles and Users module.
Run it.
$ grunt
See it at
http://localhost:3000
You should be able to see some seed articles and users. You can create some more users and write articles after logging-in. Go ahead to update and delete articles and users.