EAN is a boilerplate that provides a nice starting point for Node.js, Express, and AngularJS based applications. It is designed to give you quick and organized way to start developing of MEAN based web apps with useful modules like mongoose and passport pre-bundled and configured. We mainly try to take care of the connection points between existing popular frameworks and solve common integration problems.
Opinionated stack perfect for building large and small angular apps
- this stack targets anything newer than IE9, inluding IE9. If you need to run on IE8 or older, this boilerplate is not for you.
- stack assumes, that the app will be used on mobiles and tablets and includes angular-touch and angular-gestures to make mobile experience that much better
- Node.js - Download and Install Node.js. You can also follow this gist for a quick and easy way to install Node.js
- NPM - Node.js package manager, should be installed when you install node.js.
Global packages Prerequisites
- Bower - Web package manager, installing Bower is simple when you have npm:
$ npm install -g bower
$ npm install -g grunt-cli
- Express - Defined as npm module in the package.json file.
- AngularJS - Defined as bower module in the bower.json file.
- Twitter Bootstrap - Included in the project, because we want to be able to overwrite it easily.
- UI Bootstrap - Defined as bower module in the bower.json file.
There are two preset build environments: "dev", "production" Which one is used for build determines the "env" field in package.json.
- "dev" should be used for development- it won't minify and won't strip livereload script
- "production" should be used for production-everything get's minified, livereload is removed from index.html
The quickest way to get started with EAN is to clone the project and then:
$ npm install
Use Grunt to compile and start the server:
It is worth noting, that on "production" setting default grunt task is running just
grunt compilenot the server itself
Then open a browser and go to:
8080 is default port specified in config-dev.json
During install some of you may encounter some issues, most of this issues can be solved by one of the following tips. If you went through all this and still can't solve the issue, feel free to contact me(Amos), via the repository issue tracker or the links provided below.
Update NPM, Bower or Grunt
Sometimes you may find there is a weird error during install like npm's Error: ENOENT, usually updating those tools to the latest version solves the issue.
$ npm update -g npm
$ npm update -g grunt-cli
$ npm update -g bower
Cleaning NPM and Bower cache
NPM and Bower has a caching system for holding packages that you already installed. We found that often cleaning the cache solves some troubles this system creates.
NPM Clean Cache:
$ npm cache clean
Bower Clean Cache:
$ bower cache clean
All configuration is specified in the config folder, particularly the config.js file and the env files. Here you will need to specify your application name, database name, as well as hook up any social app keys if you want integration with Twitter, Facebook, GitHub or Google.
TODO write up on settings
To run with a different environment, just rewrite "env" in package.json to the enviroment you want.
- TODO write intro tutorial
ideal for IntelliJ Webstorm
- TODO write intro tutorial
Forked from mean.io project, also inspired by ng-boilerplate.